import{j as e}from"./assertThisInitialized-ClXgY4BW.js";import{d as v,u as j}from"./dataProvider-BSMCbdJg.js";import{r as w}from"./api-D469Uxm1.js";import{P as t}from"./ShowButton-DFgxFuea.js";import{A as B}from"./AdminContext-jMMnnv4u.js";import{d as P}from"./defaultI18nProvider-C_r1y4tu.js";import{R as b}from"./ResourceContextProvider-_t2ysSg2.js";import{R as O}from"./useRecordContext-CmNI-aHo.js";import"./index-BP8_t0zE.js";import"./createSvgIcon-BeVLBbd8.js";import"./createSvgIcon-C1LdFc73.js";import"./index-qEiLzbkV.js";import"./index-BCKAMao3.js";import"./Button-C3j8Wgdd.js";import"./useResourceContext-BI9mATY-.js";import"./PreferencesEditorContext-oPOmBo-a.js";const K={title:"Buttons/ShowButton",component:t,args:{label:"Show"},argTypes:{label:{control:"text"},variant:{control:"select",options:["text","outlined","contained"]},icon:{control:"text"},scrollToTop:{control:"boolean"}},decorators:[r=>R(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:"Edit with predefined record attributes",render:({...r})=>e.jsx(t,{...r}),args:{state:w({})},decorators:[r=>e.jsx(r,{})]},R=r=>e.jsx(B,{dataProvider:v,i18nProvider:P,children:e.jsx(b,{value:"users",children:e.jsx(O,{value:j[0],children:e.jsx(r,{})})})});var i,d,p;o.parameters={...o.parameters,docs:{...(i=o.parameters)==null?void 0:i.docs,source:{originalSource:`{
  render: ({
    ...props
  }) => {
    return <ShowButton {...props} />;
  }
}`,...(p=(d=o.parameters)==null?void 0:d.docs)==null?void 0:p.source}}};var c,u,m;n.parameters={...n.parameters,docs:{...(c=n.parameters)==null?void 0:c.docs,source:{originalSource:`{
  render: ({
    ...props
  }) => {
    return <ShowButton {...props} />;
  },
  args: {
    variant: "outlined"
  }
}`,...(m=(u=n.parameters)==null?void 0:u.docs)==null?void 0:m.source}}};var l,x,f;a.parameters={...a.parameters,docs:{...(l=a.parameters)==null?void 0:l.docs,source:{originalSource:`{
  render: ({
    ...props
  }) => {
    return <ShowButton {...props} />;
  },
  args: {
    variant: "contained"
  }
}`,...(f=(x=a.parameters)==null?void 0:x.docs)==null?void 0:f.source}}};var S,h,g;s.parameters={...s.parameters,docs:{...(S=s.parameters)==null?void 0:S.docs,source:{originalSource:`{
  name: "Edit with predefined record attributes",
  render: ({
    ...props
  }) => {
    return <ShowButton {...props} />;
  },
  args: {
    state: replaceOnGenerate({}, {
      record: {
        /*default record*/
      }
    })
  },
  decorators: [Story => <Story />]
}`,...(g=(h=s.parameters)==null?void 0:h.docs)==null?void 0:g.source}}};const L=["Default","Outlined","Filled","WithState"];export{o as Default,a as Filled,n as Outlined,s as WithState,L as __namedExportsOrder,K as default};
