import{j as i}from"./assertThisInitialized-ClXgY4BW.js";import{a as p}from"./ideExtension-Duoj5XVI.js";import{f as N}from"./fieldDecorators-DYb0TeBY.js";import{N as s}from"./ReferenceField-BimPKO3B.js";import"./index-BP8_t0zE.js";import"./utils-CkyKHvS2.js";import"./defaultI18nProvider-C_r1y4tu.js";import"./index-BCKAMao3.js";import"./dataProvider-BSMCbdJg.js";import"./useResourceDefinitionContext-mEDLreK0.js";import"./TextField-n0Myx-gm.js";import"./Typography-E7d16C50.js";import"./Button-C3j8Wgdd.js";import"./useRecordContext-CmNI-aHo.js";import"./ReferenceArrayField-ctaku4-6.js";import"./Box-UI_bZnlM.js";import"./hooks-kyAPvxe4.js";import"./index-qEiLzbkV.js";import"./Stack-BmeOikgJ.js";import"./Chip-4IhPI0f3.js";import"./useQuery-DJhJ3Hj4.js";import"./useLogout-DAYYFX4P.js";import"./SwitchBase-GsdOADyY.js";import"./pick-BQz50zYv.js";import"./hasIn-BUTlUeuZ.js";import"./_isIterateeCall-D0xvKagp.js";import"./identity-B2iMGpmP.js";import"./_baseUniq-BtunyI9N.js";import"./isArrayLikeObject-WBq23Ido.js";import"./useFormControl-D0zEVldg.js";import"./useDataProvider-BTi1EEZL.js";import"./useGetList-Dit6Yzrj.js";import"./usePaginationState-CSxOqUBu.js";import"./useRemoveFromStore-DvPdj666.js";import"./useResourceContext-BI9mATY-.js";import"./createSvgIcon-C1LdFc73.js";import"./useGetRecordRepresentation-DwGaoA_n.js";import"./useAuthenticated-CxLvTTH7.js";import"./useAuthState-Chcbfem2.js";import"./colorManipulator-DXmmM2jC.js";import"./ListNoResults-BHi6V5m8.js";import"./debounce-0x2xWYwC.js";import"./CardContent-C5u1opi3.js";import"./ResourceContextProvider-_t2ysSg2.js";import"./ListBase-CEqRUlEo.js";import"./Datagrid-BK2vyqjN.js";import"./getFieldLabelTranslationArgs-DwcCC9dO.js";import"./ExpandMore-Bu7ZqolT.js";import"./createSvgIcon-BeVLBbd8.js";import"./TopToolbar-BqW7kXvQ.js";import"./Toolbar-C8uTbHq-.js";import"./Confirm-BXDL5GEC.js";import"./Modal-CloRq8hE.js";import"./useMutation-DBpLFNEy.js";import"./undoableEventEmitter-DTIdLI-s.js";import"./useRefresh-BVYjI9Ho.js";import"./DateField-Csy-M8g5.js";import"./Clear-2k3OxyE6.js";import"./useReference-jPRH6tHJ.js";const jr={title:"Fields/NumberField",component:s,parameters:{layout:"centered",controls:{exclude:["locales","options","transform","source"]}},decorators:[...N],args:{source:"day_offs"},argTypes:{locales:{control:"text"},options:{control:"text"},transform:{control:"text"}}},t={render:({source:r,...o})=>i.jsx(s,{source:p("day_offs"),...o})},e={render:({currency:r,source:o,...m})=>i.jsx(s,{source:p("day_offs"),options:{style:"currency",currency:r},...m}),args:{currency:"USD"},argTypes:{currency:{options:["USD","EUR"],control:{type:"select"}}}},n={render:({unit:r,unitDisplay:o,source:m,...x})=>i.jsx(s,{source:p("day_offs"),options:{style:"unit",unit:r,unitDisplay:o},...x}),args:{unit:"liter",unitDisplay:"short"},argTypes:{unit:{options:["liter","gallon","kilometer"],control:{type:"select"}},unitDisplay:{options:["short","narrow","long"],control:{type:"select"}}}};var a,c,u;t.parameters={...t.parameters,docs:{...(a=t.parameters)==null?void 0:a.docs,source:{originalSource:`{
  render: ({
    source,
    ...props
  }) => {
    return <NumberField source={attributeName("day_offs")} {...props} />;
  }
}`,...(u=(c=t.parameters)==null?void 0:c.docs)==null?void 0:u.source}}};var l,y,d;e.parameters={...e.parameters,docs:{...(l=e.parameters)==null?void 0:l.docs,source:{originalSource:`{
  render: ({
    currency,
    source,
    ...props
  }) => {
    return <NumberField source={attributeName("day_offs")} options={{
      style: "currency",
      currency: currency
    }} {...props} />;
  },
  args: {
    currency: "USD"
  },
  argTypes: {
    currency: {
      options: ["USD", "EUR"],
      control: {
        type: "select"
      }
    }
  }
}`,...(d=(y=e.parameters)==null?void 0:y.docs)==null?void 0:d.source}}};var f,g,D;n.parameters={...n.parameters,docs:{...(f=n.parameters)==null?void 0:f.docs,source:{originalSource:`{
  render: ({
    unit,
    unitDisplay,
    source,
    ...props
  }) => {
    return <NumberField source={attributeName("day_offs")} options={{
      style: "unit",
      unit: unit,
      unitDisplay: unitDisplay
    }} {...props} />;
  },
  args: {
    unit: "liter",
    unitDisplay: "short"
  },
  argTypes: {
    unit: {
      options: ["liter", "gallon", "kilometer"],
      control: {
        type: "select"
      }
    },
    unitDisplay: {
      options: ["short", "narrow", "long"],
      control: {
        type: "select"
      }
    }
  }
}`,...(D=(g=n.parameters)==null?void 0:g.docs)==null?void 0:D.source}}};const Tr=["Default","Currency","Unit"];export{e as Currency,t as Default,n as Unit,Tr as __namedExportsOrder,jr as default};
