{"version":3,"file":"getFieldProps.mjs","sources":[""],"sourcesContent":["import type { IInputField, IFieldProps } from \"../config/types\";\r\n\r\n/**\r\n * Анализирует свойства поля формы и возвращает флаги для всех специальных типов полей\r\n * @param {IInputField} input - Объект с параметрами поля формы\r\n * @param {string} [input.type] - Тип поля (textarea, file, password и т.д.)\r\n * @param {boolean} [input.isRequired] - Обязательность заполнения поля\r\n * @returns {IFieldProps} Объект с флагами свойств поля:\r\n */\r\nexport const getFieldProps = (input: IInputField = {}): IFieldProps => {\r\n  const { type, isRequired } = input;\r\n  const isRadio = type === \"radio\";\r\n  const isCheckbox = type === \"checkbox\";\r\n\r\n  return {\r\n    isTextArea: type === \"textarea\",\r\n    isFile: type === \"file\",\r\n    isPassword: type === \"password\",\r\n    isHidden: type === \"hidden\",\r\n    isCaptcha: type === \"captcha\",\r\n    isSelect: type === \"select\",\r\n    isCanChecked: isRadio || isCheckbox,\r\n    isRequired,\r\n    isRadio,\r\n    isCheckbox,\r\n  };\r\n};\r\n"],"names":["getFieldProps","input","type","isRequired","isRadio","isCheckbox","isTextArea","isFile","isPassword","isHidden","isCaptcha","isSelect","isCanChecked"],"mappings":";;;;;;;AASO,MAAMA,cAAgB,CAACC,MAAqB,MACjD,MAAMC,KAAEA,KAAIC,WAAEA,YAAeF,MAC7B,MAAMG,QAAUF,OAAS,QACzB,MAAMG,WAAaH,OAAS,WAE5B,MAAO,CACLI,WAAYJ,OAAS,WACrBK,OAAQL,OAAS,OACjBM,WAAYN,OAAS,WACrBO,SAAUP,OAAS,SACnBQ,UAAWR,OAAS,UACpBS,SAAUT,OAAS,SACnBU,aAAcR,SAAWC,WACzBF,sBACAC,gBACAC"}