import{j as e}from"./assertThisInitialized-ClXgY4BW.js";import{A as v}from"./utils-CkyKHvS2.js";import{d as S,u as B}from"./dataProvider-BSMCbdJg.js";import{r as h}from"./api-D469Uxm1.js";import{D as s}from"./DeleteButton-BNKEwqMZ.js";import{A as b}from"./AdminContext-jMMnnv4u.js";import{d as O}from"./defaultI18nProvider-C_r1y4tu.js";import{R as P}from"./useRecordContext-CmNI-aHo.js";import"./index-BP8_t0zE.js";import"./useResourceDefinitionContext-mEDLreK0.js";import"./Confirm-BXDL5GEC.js";import"./createSvgIcon-BeVLBbd8.js";import"./createSvgIcon-C1LdFc73.js";import"./Typography-E7d16C50.js";import"./Modal-CloRq8hE.js";import"./Button-C3j8Wgdd.js";import"./colorManipulator-DXmmM2jC.js";import"./useResourceContext-BI9mATY-.js";import"./useRemoveFromStore-DvPdj666.js";import"./useRedirect-BE8GZC2N.js";import"./useMutation-DBpLFNEy.js";import"./useLogout-DAYYFX4P.js";import"./useDataProvider-BTi1EEZL.js";import"./undoableEventEmitter-DTIdLI-s.js";import"./PreferencesEditorContext-oPOmBo-a.js";import"./index-qEiLzbkV.js";import"./index-BCKAMao3.js";const rr={title:"Buttons/DeleteButton",component:v,args:{label:"Delete"},argTypes:{label:{control:"text"},variant:{control:"select",options:["text","outlined","contained"]},icon:{control:"text"},scrollToTop:{control:"boolean"}},decorators:[r=>y(r)]},t={render:({...r})=>e.jsx(s,{...r})},o={render:({...r})=>e.jsx(s,{...r}),args:{variant:"outlined"}},n={render:({...r})=>e.jsx(s,{...r}),args:{variant:"contained"}},a={name:"Delete with predefined record attributes",render:({...r})=>e.jsx(s,{...r}),args:{state:h({})},decorators:[r=>e.jsx(r,{})]},y=r=>e.jsx(b,{dataProvider:S,i18nProvider:O,children:e.jsx(P,{value:B[0],children:e.jsx(r,{})})});var p,i,m;t.parameters={...t.parameters,docs:{...(p=t.parameters)==null?void 0:p.docs,source:{originalSource:`{
  render: ({
    ...props
  }) => {
    return <DeleteButton {...props} />;
  }
}`,...(m=(i=t.parameters)==null?void 0:i.docs)==null?void 0:m.source}}};var d,c,l;o.parameters={...o.parameters,docs:{...(d=o.parameters)==null?void 0:d.docs,source:{originalSource:`{
  render: ({
    ...props
  }) => {
    return <DeleteButton {...props} />;
  },
  args: {
    variant: "outlined"
  }
}`,...(l=(c=o.parameters)==null?void 0:c.docs)==null?void 0:l.source}}};var u,x,f;n.parameters={...n.parameters,docs:{...(u=n.parameters)==null?void 0:u.docs,source:{originalSource:`{
  render: ({
    ...props
  }) => {
    return <DeleteButton {...props} />;
  },
  args: {
    variant: "contained"
  }
}`,...(f=(x=n.parameters)==null?void 0:x.docs)==null?void 0:f.source}}};var D,g,j;a.parameters={...a.parameters,docs:{...(D=a.parameters)==null?void 0:D.docs,source:{originalSource:`{
  name: "Delete with predefined record attributes",
  render: ({
    ...props
  }) => {
    return <DeleteButton {...props} />;
  },
  args: {
    state: replaceOnGenerate({}, {
      record: {
        /*default record*/
      }
    })
  },
  decorators: [Story => <Story />]
}`,...(j=(g=a.parameters)==null?void 0:g.docs)==null?void 0:j.source}}};const er=["Default","Outlined","Filled","WithState"];export{t as Default,n as Filled,o as Outlined,a as WithState,er as __namedExportsOrder,rr as default};
