{"version":3,"file":"split-wrapper-props.cjs","names":[],"sources":["../../../src/components/Mentions/split-wrapper-props.ts"],"sourcesContent":["import type { __BaseInputProps } from '../Input';\n\nconst WRAPPER_PROPS = [\n  'label',\n  'description',\n  'error',\n  'success',\n  'withAsterisk',\n  'labelProps',\n  'descriptionProps',\n  'errorProps',\n  'successProps',\n  'inputContainer',\n  'inputWrapperOrder',\n  'wrapperProps',\n  'variant',\n  'mod',\n  'radius',\n  'leftSection',\n  'leftSectionWidth',\n  'leftSectionProps',\n  'leftSectionPointerEvents',\n  'rightSection',\n  'rightSectionWidth',\n  'rightSectionProps',\n  'rightSectionPointerEvents',\n  'withErrorStyles',\n  'withSuccessStyles',\n  'inputSize',\n  'pointer',\n  'loading',\n  'loadingPosition',\n] as const satisfies readonly (keyof __BaseInputProps | 'variant' | 'mod')[];\n\nconst WRAPPER_PROPS_SET = new Set<string>(WRAPPER_PROPS);\n\ntype WrapperPropName = (typeof WRAPPER_PROPS)[number];\n\nexport function splitWrapperProps<T extends Record<string, any>>(props: T) {\n  const wrapperProps: Record<string, any> = {};\n  const controlProps: Record<string, any> = {};\n\n  for (const key of Object.keys(props)) {\n    if (WRAPPER_PROPS_SET.has(key)) {\n      wrapperProps[key] = props[key];\n    } else {\n      controlProps[key] = props[key];\n    }\n  }\n\n  return {\n    wrapperProps: wrapperProps as Pick<T, Extract<keyof T, WrapperPropName>>,\n    controlProps: controlProps as Omit<T, WrapperPropName>,\n  };\n}\n"],"mappings":";;AAkCA,MAAM,oCAAoB,IAAI,IAAY;CA/BxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAGoD,CAAC;AAIvD,SAAgB,kBAAiD,OAAU;CACzE,MAAM,eAAoC,CAAC;CAC3C,MAAM,eAAoC,CAAC;CAE3C,KAAK,MAAM,OAAO,OAAO,KAAK,KAAK,GACjC,IAAI,kBAAkB,IAAI,GAAG,GAC3B,aAAa,OAAO,MAAM;MAE1B,aAAa,OAAO,MAAM;CAI9B,OAAO;EACS;EACA;CAChB;AACF"}