{"version":3,"sources":["../src/components/gui/components/XGUIBoxShadowField.tsx"],"names":["React","Divider","Stack","TextField","Typography","compareProps","prevProps","nextProps","XGUIBoxShadowField","field","currentValue","onChange","id","bp","useBreakpoint","e","XGUIBoxShadowField_default"],"mappings":"sEAAA,UAAYA,MAAW,QAMvB,OAAS,WAAAC,EAAS,SAAAC,EAAO,aAAAC,EAAW,cAAAC,MAAkB,gBAGtD,IAAMC,EAAe,CAACC,EAAgBC,IAE7BD,EAAU,eAAiBC,EAAU,aAQxCC,EAA8D,OAClE,CAAC,CAAE,MAAAC,EAAO,aAAAC,EAAc,SAAAC,CAAS,IAAM,CACrC,IAAMC,EAAK,cAAcH,EAAM,OACzBI,EAAKC,EAAc,EAEzB,OACE,gBAAO,WAAN,KACC,gBAACZ,EAAA,CACC,UAAU,YACV,UAAU,MACV,eAAe,gBACf,WAAY,SACZ,GAAI,GAWJ,gBAACE,EAAA,CAAW,UAAU,QAAQ,QAASQ,EAAI,MAAM,OAC9CH,EAAM,KACT,EACA,gBAACN,EAAA,CACC,GAAIS,EACJ,GAAI,CAAE,GAAI,CAAE,EACZ,UAAS,GACT,YAAW,GACX,KAAK,QACL,YAAaH,EAAM,aAAeA,EAAM,MACxC,MAAOC,GAAgBD,EAAM,aAC7B,SAAWM,GAAM,CACfJ,EAASI,EAAE,OAAO,MAAON,EAAM,KAAMI,CAAE,CACzC,EACF,CACF,EACA,gBAACZ,EAAA,CAAQ,GAAI,CAAE,YAAa,wBAAyB,GAAI,CAAE,EAAG,CAChE,CAEJ,EACAI,CACF,EAEOW,EAAQR","sourcesContent":["import * as React from \"react\";\nimport {\n  IXGUIFieldBase,\n  TOnChange,\n} from \"../../../utils/interfaces/gui/fields.interfaces\";\n\nimport { Divider, Stack, TextField, Typography } from \"@mui/material\";\nimport { useBreakpoint } from \"../../../hooks/useBreakpoint\";\n\nconst compareProps = (prevProps: any, nextProps: any) => {\n  // return isEqual(prevProps, nextProps);\n  return prevProps.currentValue === nextProps.currentValue;\n};\n\ninterface XGUIBoxShadowFieldProps extends IXGUIFieldBase {\n  onChange: TOnChange<string>;\n  currentValue: string;\n}\n\nconst XGUIBoxShadowField: React.FC<XGUIBoxShadowFieldProps> = React.memo(\n  ({ field, currentValue, onChange }) => {\n    const id = `XGUI-FIELD-${field.name}`;\n    const bp = useBreakpoint();\n\n    return (\n      <React.Fragment>\n        <Stack\n          className=\"XGUIField\"\n          direction=\"row\"\n          justifyContent=\"space-between\"\n          alignItems={\"center\"}\n          mb={1}\n        >\n          {/* <AntSwitch\n            size=\"small\"\n            sx={{ mr: 1 }}\n            checked={!disabled}\n            onChange={(e) => {\n              setDisabled(!e.target.checked);\n              debounced(value);\n            }}\n          /> */}\n          <Typography component=\"label\" htmlFor={id} width=\"40%\">\n            {field.label}\n          </Typography>\n          <TextField\n            id={id}\n            sx={{ ml: 1 }}\n            fullWidth\n            hiddenLabel\n            size=\"small\"\n            placeholder={field.placeholder ?? field.label}\n            value={currentValue ?? field.defaultValue}\n            onChange={(e) => {\n              onChange(e.target.value, field.name, bp);\n            }}\n          />\n        </Stack>\n        <Divider sx={{ borderColor: \"rgba(255,255,255,0.1)\", mb: 1 }} />\n      </React.Fragment>\n    );\n  },\n  compareProps\n);\n\nexport default XGUIBoxShadowField;\n"]}