import{j as p}from"./assertThisInitialized-ClXgY4BW.js";import{a as s}from"./ideExtension-Duoj5XVI.js";import{i as y}from"./inputDecorators-Mc1L5s5f.js";import{N as m}from"./NumberInput-D5bldgKh.js";import{m as N,a as g}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"./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 Tr={title:"Inputs/NumberInput",component:m,parameters:{},decorators:[...y],args:{source:"day_offs"},argTypes:{label:{control:"text"},max:{control:"number"},min:{control:"number"},step:{control:"number"}}},o={render:({source:a,...r})=>p.jsx(m,{source:s("day_offs"),...r})},t={render:({source:a,...r})=>p.jsx(m,{source:s("day_offs"),...r}),args:{label:"User day offs"}},e={render:({source:a,...r})=>p.jsx(m,{source:s("day_offs"),min:0,max:10,validate:[N(0,"Must be at least 0"),g(10,"Must be 10 or less")],...r}),args:{label:"User day offs"}};var i,n,u;o.parameters={...o.parameters,docs:{...(i=o.parameters)==null?void 0:i.docs,source:{originalSource:`{
  render: ({
    source,
    ...props
  }) => {
    return <NumberInput source={attributeName("day_offs")} {...props} />;
  }
}`,...(u=(n=o.parameters)==null?void 0:n.docs)==null?void 0:u.source}}};var c,d,l;t.parameters={...t.parameters,docs:{...(c=t.parameters)==null?void 0:c.docs,source:{originalSource:`{
  render: ({
    source,
    ...props
  }) => {
    return <NumberInput source={attributeName("day_offs")} {...props} />;
  },
  args: {
    label: "User day offs"
  }
}`,...(l=(d=t.parameters)==null?void 0:d.docs)==null?void 0:l.source}}};var f,b,x;e.parameters={...e.parameters,docs:{...(f=e.parameters)==null?void 0:f.docs,source:{originalSource:`{
  render: ({
    source,
    ...props
  }) => {
    return <NumberInput source={attributeName("day_offs")} min={0} max={10} validate={[minValue(0, "Must be at least 0"), maxValue(10, "Must be 10 or less")]} {...props} />;
  },
  args: {
    label: "User day offs"
  }
}`,...(x=(b=e.parameters)==null?void 0:b.docs)==null?void 0:x.source}}};const hr=["Default","CustomLabel","MinAndMaxValidation"];export{t as CustomLabel,o as Default,e as MinAndMaxValidation,hr as __namedExportsOrder,Tr as default};
