import{j as a}from"./assertThisInitialized-ClXgY4BW.js";import{Y as I}from"./defaultI18nProvider-C_r1y4tu.js";import{r as v}from"./createSvgIcon-BeVLBbd8.js";import{a as O}from"./ideExtension-Duoj5XVI.js";import{f as x}from"./fieldDecorators-DYb0TeBY.js";import{B as l}from"./ReferenceField-BimPKO3B.js";import"./index-BP8_t0zE.js";import"./index-BCKAMao3.js";import"./createSvgIcon-C1LdFc73.js";import"./utils-CkyKHvS2.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"./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"./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";var i={},T=I;Object.defineProperty(i,"__esModule",{value:!0});var o=i.default=void 0,g=T(v()),L=a;o=i.default=(0,g.default)((0,L.jsx)("path",{d:"m22 5.72-4.6-3.86-1.29 1.53 4.6 3.86zM7.88 3.39 6.6 1.86 2 5.71l1.29 1.53zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9m0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7m-1.46-5.47L8.41 12.4l-1.06 1.06 3.18 3.18 6-6-1.06-1.06z"}),"AlarmOn");var c={},_=I;Object.defineProperty(c,"__esModule",{value:!0});var t=c.default=void 0,j=_(v()),z=a;t=c.default=(0,j.default)((0,z.jsx)("path",{d:"M12 6c3.87 0 7 3.13 7 7 0 .84-.16 1.65-.43 2.4l1.52 1.52c.58-1.19.91-2.51.91-3.92 0-4.97-4.03-9-9-9-1.41 0-2.73.33-3.92.91L9.6 6.43C10.35 6.16 11.16 6 12 6m10-.28-4.6-3.86-1.29 1.53 4.6 3.86zM2.92 2.29 1.65 3.57 2.98 4.9l-1.11.93 1.42 1.42 1.11-.94.8.8C3.83 8.69 3 10.75 3 13c0 4.97 4.02 9 9 9 2.25 0 4.31-.83 5.89-2.2l2.2 2.2 1.27-1.27L3.89 3.27zm13.55 16.1C15.26 19.39 13.7 20 12 20c-3.87 0-7-3.13-7-7 0-1.7.61-3.26 1.61-4.47zM8.02 3.28 6.6 1.86l-.86.71 1.42 1.42z"}),"AlarmOff");const Br={title:"Fields/BooleanField",component:l,parameters:{layout:"centered"},decorators:[...x],args:{source:"active"},argTypes:{valueLabelTrue:{control:"text"},valueLabelFalse:{control:"text"},TrueIcon:{control:"text"},FalseIcon:{control:"text"}}},r={render:({source:A,...m})=>a.jsx(l,{source:O("active"),...m}),parameters:{controls:{exclude:["TrueIcon","FalseIcon","source"]}}},e={render:({source:A,valueLabelTrue:m,valueLabelFalse:b,...F})=>a.jsx(l,{source:O("active"),valueLabelTrue:m,valueLabelFalse:b,title:"Active",...F}),args:{valueLabelTrue:"User is active",valueLabelFalse:"User is banned",TrueIcon:o,FalseIcon:t},argTypes:{TrueIcon:{control:"select",options:["AlarmOnIcon","AlarmOffIcon"],mapping:{AlarmOnIcon:o,AlarmOffIcon:t}},FalseIcon:{control:"select",options:["AlarmOnIcon","AlarmOffIcon"],mapping:{AlarmOnIcon:o,AlarmOffIcon:t}}}};var p,n,s;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`{
  render: ({
    source,
    ...props
  }) => {
    return <BooleanField source={attributeName("active")} {...props} />;
  },
  parameters: {
    controls: {
      exclude: ['TrueIcon', 'FalseIcon', 'source']
    }
  }
}`,...(s=(n=r.parameters)==null?void 0:n.docs)==null?void 0:s.source}}};var u,f,d;e.parameters={...e.parameters,docs:{...(u=e.parameters)==null?void 0:u.docs,source:{originalSource:`{
  render: ({
    source,
    valueLabelTrue,
    valueLabelFalse,
    ...props
  }) => {
    return <BooleanField source={attributeName("active")} valueLabelTrue={valueLabelTrue} valueLabelFalse={valueLabelFalse} title={"Active"} {...props} />;
  },
  args: {
    valueLabelTrue: "User is active",
    valueLabelFalse: "User is banned",
    TrueIcon: AlarmOnIcon,
    FalseIcon: AlarmOffIcon
  },
  argTypes: {
    TrueIcon: {
      control: 'select',
      options: ["AlarmOnIcon", "AlarmOffIcon"],
      mapping: {
        AlarmOnIcon: AlarmOnIcon,
        AlarmOffIcon: AlarmOffIcon
      }
    },
    FalseIcon: {
      control: 'select',
      options: ["AlarmOnIcon", "AlarmOffIcon"],
      mapping: {
        AlarmOnIcon: AlarmOnIcon,
        AlarmOffIcon: AlarmOffIcon
      }
    }
  }
}`,...(d=(f=e.parameters)==null?void 0:f.docs)==null?void 0:d.source}}};const Sr=["Default","Custom"];export{e as Custom,r as Default,Sr as __namedExportsOrder,Br as default};
