hunk.code_window:       (formValues.DeploymentType === KubernetesApplicationDeploymentTypes.Global &&
           (claims.length === 0 || (claims.length > 0 && formValues.DataAccessPolicy === KubernetesApplicationDataAccessPolicies.Shared && rwx))) ||
         formValues.ApplicationType === KubernetesApplicationTypes.DaemonSet;
       const pod = formValues.ApplicationType === KubernetesApplicationTypes.POD;
       let app;
       if (deployment) {
         app = KubernetesDeploymentConverter.applicationFormValuesToDeployment(formValues, claims);
  
hunk.labels: keep keep keep keep replace keep keep keep keep
hunk.after_edit:     const pod = formValues.ApplicationType === KubernetesApplicationTypes.Pod;
  
hunk.file_path: app/kubernetes/converters/application.js
hunk.type: replace
file: import _ from 'lodash';
  import { useState, useRef, useCallback, useEffect } from 'react';
  
  export function useDebounce(value: string, onChange: (value: string) => void) {
    const [debouncedValue, setDebouncedValue] = useState(value);
  
    const onChangeDebounces = useRef(_.debounce(onChange, 300));
  
    const handleChange = useCallback(
      (value: string) => {
        setDebouncedValue(value);
        onChangeDebounces.current(value);
      },
      [onChangeDebounces, setDebouncedValue]
    );
  
    useEffect(() => {
      setDebouncedValue(value);
    }, [value]);
  
    return [debouncedValue, handleChange] as const;
  }
  