{"version":3,"sources":["../src/modules/core/components/shared/Forms/Input/Price.tsx"],"names":["NumericFormatCustom","React","props","ref","onChange","other","jsx","NumericFormat","values","InputPriceComponent","key","forwardRef","id","name","className","size","label","variant","fullWidth","error","required","pattern","minLength","maxLength","helperText","disabled","TextField","InputPrice","Price_default"],"mappings":"2JAMA,IAAMA,CAAAA,CAAsBC,EAAM,UAChC,CAAA,SAA6BC,CAAOC,CAAAA,CAAAA,CAAK,CACvC,GAAM,CAAE,SAAAC,CAAU,CAAA,GAAGC,CAAM,CAAIH,CAAAA,CAAAA,CAE/B,OACEI,GAAAA,CAACC,cAAA,CACE,GAAGF,EACJ,WAAaF,CAAAA,CAAAA,CACb,cAAgBK,CAAW,EAAA,CACzBJ,CAAS,CAAA,CACP,OAAQ,CACN,IAAA,CAAMF,EAAM,IACZ,CAAA,KAAA,CAAOM,EAAO,KAChB,CACF,CAAC,EACH,EACA,iBAAiB,CAAA,CAAA,CAAA,CACjB,qBAAoB,CACpB,CAAA,CAAA,MAAA,CAAO,IACT,CAEJ,CACF,CAEMC,CAAAA,CAAAA,CAAuC,CAAC,CAC5C,GAAA,CAAAC,EACA,UAAAC,CAAAA,CAAAA,CACA,GAAAC,CACA,CAAA,IAAA,CAAAC,CACA,CAAA,SAAA,CAAAC,EAAY,EACZ,CAAA,IAAA,CAAAC,EAAO,OACP,CAAA,KAAA,CAAAC,EAAQ,EACR,CAAA,OAAA,CAAAC,CAAU,CAAA,UAAA,CACV,UAAAC,CAAY,CAAA,CAAA,CAAA,CACZ,MAAAC,CAAQ,CAAA,CAAA,CAAA,CACR,SAAAC,CAAW,CAAA,CAAA,CAAA,CACX,OAAAC,CAAAA,CAAAA,CACA,UAAAC,CACA,CAAA,SAAA,CAAAC,EACA,UAAAC,CAAAA,CAAAA,CACA,SAAAC,CAAW,CAAA,CAAA,CAAA,CACX,QAAArB,CAAAA,CAAAA,CACA,GAAGF,CACL,CAAA,GAEII,IAACoB,SAAA,CAAA,CAEC,IAAKf,CACL,CAAA,SAAA,CAAWG,CACX,CAAA,EAAA,CAAIF,EACJ,IAAMC,CAAAA,CAAAA,CACN,KAAME,CACN,CAAA,KAAA,CAAOC,EACP,QAAUI,CAAAA,CAAAA,CACV,KAAOlB,CAAAA,CAAAA,CAAM,MACb,QAAUuB,CAAAA,CAAAA,CACV,QAASR,CACT,CAAA,QAAA,CAAUb,EACV,SAAWc,CAAAA,CAAAA,CACX,UAAYM,CAAAA,CAAAA,CACZ,MAAOL,CACP,CAAA,UAAA,CAAY,CACV,cAAgBnB,CAAAA,CAClB,EACC,GAAGE,CAAAA,CAAAA,CAlBCQ,CAmBP,CAAA,CAIEiB,EAAahB,UAAW,CAAA,CAACT,EAAcC,CAC3CG,GAAAA,GAAAA,CAACG,EAAA,CAAqB,GAAGP,CAAO,CAAA,UAAA,CAAYC,EAAK,CAClD,CAAA,CACDwB,EAAW,WAAc,CAAA,YAAA,KAClBC,CAAQD,CAAAA","file":"Price-7H2EKM66.mjs","sourcesContent":["import React, { forwardRef } from 'react'\nimport { Props, CustomProps } from '@/modules/core/components/shared/Forms/Input/types'\nimport { NumericFormat } from 'react-number-format'\nimport { TextField } from '@mui/material'\n\n//@ts-ignore\nconst NumericFormatCustom = React.forwardRef<NumericFormat<any>, CustomProps>(\n  function NumericFormatCustom(props, ref) {\n    const { onChange, ...other } = props\n\n    return (\n      <NumericFormat\n        {...other}\n        getInputRef={ref}\n        onValueChange={(values) => {\n          onChange({\n            target: {\n              name: props.name,\n              value: values.value,\n            },\n          })\n        }}\n        thousandSeparator\n        valueIsNumericString\n        prefix=\"$\"\n      />\n    )\n  }\n)\n\nconst InputPriceComponent: React.FC<Props> = ({\n  key,\n  forwardRef,\n  id,\n  name,\n  className = '',\n  size = 'small',\n  label = '',\n  variant = 'outlined',\n  fullWidth = true,\n  error = false,\n  required = false,\n  pattern,\n  minLength,\n  maxLength,\n  helperText,\n  disabled = false,\n  onChange,\n  ...props\n}) => {\n  return (\n    <TextField\n      key={key}\n      ref={forwardRef as any}\n      className={className}\n      id={id}\n      name={name}\n      size={size}\n      label={label}\n      required={required}\n      value={props.value}\n      disabled={disabled}\n      variant={variant}\n      onChange={onChange}\n      fullWidth={fullWidth}\n      helperText={helperText}\n      error={error}\n      InputProps={{\n        inputComponent: NumericFormatCustom as any,\n      }}\n      {...props}\n    />\n  )\n}\n\nconst InputPrice = forwardRef((props: Props, ref) => (\n  <InputPriceComponent {...props} forwardRef={ref} />\n))\nInputPrice.displayName = 'InputPrice'\nexport default InputPrice\n"]}