import{j as a}from"./assertThisInitialized-ClXgY4BW.js";import{a as s}from"./ideExtension-Duoj5XVI.js";import{i as j}from"./inputDecorators-Mc1L5s5f.js";import{T as e,r as y,b as $}from"./SimpleForm-DxY-i_Qk.js";import"./index-BP8_t0zE.js";import"./index-BCKAMao3.js";import"./utils-CkyKHvS2.js";import"./defaultI18nProvider-C_r1y4tu.js";import"./dataProvider-BSMCbdJg.js";import"./useResourceDefinitionContext-mEDLreK0.js";import"./Create-DhH8wTBS.js";import"./Title-Db_cbkJo.js";import"./Button-C3j8Wgdd.js";import"./createSvgIcon-BeVLBbd8.js";import"./createSvgIcon-C1LdFc73.js";import"./PreferencesEditorContext-oPOmBo-a.js";import"./TextField-z9WrHgJg.js";import"./useFormControl-D0zEVldg.js";import"./Modal-CloRq8hE.js";import"./colorManipulator-DXmmM2jC.js";import"./useRecordContext-CmNI-aHo.js";import"./warning-3oRADCZr.js";import"./Card-Cv9uZOGS.js";import"./checkMinimumRequiredProps-BCJG0Ked.js";import"./pick-BQz50zYv.js";import"./hasIn-BUTlUeuZ.js";import"./_isIterateeCall-D0xvKagp.js";import"./identity-B2iMGpmP.js";import"./useCreate-CQ5Hl1r5.js";import"./useMutation-DBpLFNEy.js";import"./useLogout-DAYYFX4P.js";import"./useDataProvider-BTi1EEZL.js";import"./useAuthenticated-CxLvTTH7.js";import"./useAuthState-Chcbfem2.js";import"./useQuery-DJhJ3Hj4.js";import"./useResourceContext-BI9mATY-.js";import"./DateInput-Cata5nxE.js";import"./DeleteButton-BNKEwqMZ.js";import"./Confirm-BXDL5GEC.js";import"./Typography-E7d16C50.js";import"./useRemoveFromStore-DvPdj666.js";import"./useRedirect-BE8GZC2N.js";import"./undoableEventEmitter-DTIdLI-s.js";import"./getFieldLabelTranslationArgs-DwcCC9dO.js";import"./ResourceContextProvider-_t2ysSg2.js";import"./ReferenceInput-DMhWsfVF.js";import"./Stack-BmeOikgJ.js";import"./SwitchBase-GsdOADyY.js";import"./_baseUniq-BtunyI9N.js";import"./isArrayLikeObject-WBq23Ido.js";import"./debounce-0x2xWYwC.js";import"./Chip-4IhPI0f3.js";import"./useGetList-Dit6Yzrj.js";import"./hooks-kyAPvxe4.js";import"./usePaginationState-CSxOqUBu.js";import"./useGetRecordRepresentation-DwGaoA_n.js";import"./FormGroupsProvider-B1X-6k0S.js";import"./useReference-jPRH6tHJ.js";import"./NumberInput-D5bldgKh.js";import"./SelectInput-vp6FLJto.js";import"./CircularProgress-CoZCnRya.js";import"./MenuItem-CP3dxiK8.js";import"./listItemTextClasses-C7xWMLDP.js";import"./Clear-2k3OxyE6.js";import"./Toolbar-C8uTbHq-.js";import"./CardContent-C5u1opi3.js";import"./merge-2TaxnYbe.js";import"./_copyObject-Dr_k0OJK.js";import"./OptionalRecordContextProvider-ChL7EZ8k.js";const kr={title:"Inputs/TextInput",component:e,parameters:{},decorators:[...j],args:{source:"name"},argTypes:{multiline:{control:"boolean"},resettable:{control:"boolean"},type:{control:"select",options:["password","search","tel","text"]}}},t={render:({source:i,...r})=>a.jsx(e,{source:s("name"),...r})},o={render:({source:i,...r})=>a.jsx(e,{source:s("name"),...r}),args:{label:"Custom label"}},m={render:({source:i,...r})=>a.jsx(e,{source:s("name"),validate:[y()],...r}),args:{label:"User name"}},p={render:({source:i,...r})=>a.jsx(e,{source:s("name"),validate:$(/^((?![<>#$%&]).)*$/,'Symbols "<>#$%&" are prohibited'),...r}),args:{label:"User name"}};var n,u,c;t.parameters={...t.parameters,docs:{...(n=t.parameters)==null?void 0:n.docs,source:{originalSource:`{
  render: ({
    source,
    ...props
  }) => {
    return <TextInput source={attributeName("name")} {...props} />;
  }
}`,...(c=(u=t.parameters)==null?void 0:u.docs)==null?void 0:c.source}}};var l,d,b;o.parameters={...o.parameters,docs:{...(l=o.parameters)==null?void 0:l.docs,source:{originalSource:`{
  render: ({
    source,
    ...props
  }) => {
    return <TextInput source={attributeName("name")} {...props} />;
  },
  args: {
    label: "Custom label"
  }
}`,...(b=(d=o.parameters)==null?void 0:d.docs)==null?void 0:b.source}}};var x,g,S;m.parameters={...m.parameters,docs:{...(x=m.parameters)==null?void 0:x.docs,source:{originalSource:`{
  render: ({
    source,
    ...props
  }) => {
    return <TextInput source={attributeName("name")} validate={[required()]} {...props} />;
  },
  args: {
    label: "User name"
  }
}`,...(S=(g=m.parameters)==null?void 0:g.docs)==null?void 0:S.source}}};var T,f,I;p.parameters={...p.parameters,docs:{...(T=p.parameters)==null?void 0:T.docs,source:{originalSource:`{
  render: ({
    source,
    ...props
  }) => {
    return <TextInput source={attributeName("name")} validate={regex(/^((?![<>#$%&]).)*$/, 'Symbols "<>#$%&" are prohibited')} {...props} />;
  },
  args: {
    label: "User name"
  }
}`,...(I=(f=p.parameters)==null?void 0:f.docs)==null?void 0:I.source}}};const zr=["Default","CustomLabel","RequiredValidation","MetaSymbolsValidation"];export{o as CustomLabel,t as Default,p as MetaSymbolsValidation,m as RequiredValidation,zr as __namedExportsOrder,kr as default};
