import{j as e}from"./assertThisInitialized-ClXgY4BW.js";import{d as v}from"./dataProvider-BSMCbdJg.js";import{r as S}from"./api-D469Uxm1.js";import{C as t}from"./CreateButton-BoKnyQsN.js";import{A as B}from"./AdminContext-jMMnnv4u.js";import{d as h}from"./defaultI18nProvider-C_r1y4tu.js";import{R as b}from"./ResourceContextProvider-_t2ysSg2.js";import"./index-BP8_t0zE.js";import"./createSvgIcon-BeVLBbd8.js";import"./createSvgIcon-C1LdFc73.js";import"./merge-2TaxnYbe.js";import"./_copyObject-Dr_k0OJK.js";import"./isArrayLikeObject-WBq23Ido.js";import"./identity-B2iMGpmP.js";import"./_isIterateeCall-D0xvKagp.js";import"./index-qEiLzbkV.js";import"./index-BCKAMao3.js";import"./Button-C3j8Wgdd.js";import"./useResourceContext-BI9mATY-.js";import"./PreferencesEditorContext-oPOmBo-a.js";const M={title:"Buttons/CreateButton",component:t,args:{label:"Create"},argTypes:{label:{control:"text"},variant:{control:"select",options:["text","outlined","contained"]},icon:{control:"text"},scrollToTop:{control:"boolean"}},decorators:[r=>O(r)]},o={render:({...r})=>e.jsx(t,{...r})},n={render:({...r})=>e.jsx(t,{...r}),args:{variant:"outlined"}},a={render:({...r})=>e.jsx(t,{...r}),args:{variant:"contained"}},s={name:"Create with predefined record attributes",render:({...r})=>e.jsx(t,{...r}),args:{state:S({})},decorators:[r=>e.jsx(r,{})]},O=r=>e.jsx(B,{dataProvider:v,i18nProvider:h,children:e.jsx(b,{value:"users",children:e.jsx(r,{})})});var i,p,d;o.parameters={...o.parameters,docs:{...(i=o.parameters)==null?void 0:i.docs,source:{originalSource:`{
  render: ({
    ...props
  }) => {
    return <CreateButton {...props} />;
  }
}`,...(d=(p=o.parameters)==null?void 0:p.docs)==null?void 0:d.source}}};var c,m,u;n.parameters={...n.parameters,docs:{...(c=n.parameters)==null?void 0:c.docs,source:{originalSource:`{
  render: ({
    ...props
  }) => {
    return <CreateButton {...props} />;
  },
  args: {
    variant: "outlined"
  }
}`,...(u=(m=n.parameters)==null?void 0:m.docs)==null?void 0:u.source}}};var l,x,f;a.parameters={...a.parameters,docs:{...(l=a.parameters)==null?void 0:l.docs,source:{originalSource:`{
  render: ({
    ...props
  }) => {
    return <CreateButton {...props} />;
  },
  args: {
    variant: "contained"
  }
}`,...(f=(x=a.parameters)==null?void 0:x.docs)==null?void 0:f.source}}};var g,C,j;s.parameters={...s.parameters,docs:{...(g=s.parameters)==null?void 0:g.docs,source:{originalSource:`{
  name: "Create with predefined record attributes",
  render: ({
    ...props
  }) => {
    return <CreateButton {...props} />;
  },
  args: {
    state: replaceOnGenerate({}, {
      record: {
        /*default record*/
      }
    })
  },
  decorators: [Story => <Story />]
}`,...(j=(C=s.parameters)==null?void 0:C.docs)==null?void 0:j.source}}};const N=["Default","Outlined","Filled","WithState"];export{o as Default,a as Filled,n as Outlined,s as WithState,N as __namedExportsOrder,M as default};
