import{j as o}from"./assertThisInitialized-ClXgY4BW.js";import{d as b}from"./dataProvider-BSMCbdJg.js";import{S as i}from"./Show-CQpDTbX7.js";import{S as d}from"./SimpleShowLayout-Bj8OsoZA.js";import{B as A}from"./Box-UI_bZnlM.js";import{S as f}from"./Stack-BmeOikgJ.js";import{T as a}from"./Typography-E7d16C50.js";import{T as r}from"./TextField-n0Myx-gm.js";import{D as l}from"./DateField-Csy-M8g5.js";import{A as v}from"./AdminContext-jMMnnv4u.js";import{d as F}from"./defaultI18nProvider-C_r1y4tu.js";import{R as k}from"./ResourceContextProvider-_t2ysSg2.js";import{T}from"./TopToolbar-BqW7kXvQ.js";import{B as w}from"./Button-C3j8Wgdd.js";const D=()=>{console.log("Custom action result")},L=()=>o.jsx(T,{children:o.jsx(w,{color:"primary",onClick:D,label:"Custom Action"})}),P=()=>o.jsx(A,{sx:{paddingX:4,paddingY:8,width:300},children:o.jsxs(f,{spacing:2,children:[o.jsx(a,{variant:"h6",children:"Aside content"}),o.jsx(a,{children:"Additional aside content"})]})}),B={title:"Pages/Show",component:i,decorators:[e=>_(e)],args:{id:1},argTypes:{title:{control:"text"},actions:{control:"select",options:["default","customActions"],mapping:{default:void 0,customActions:o.jsx(L,{})}},aside:{control:"select",options:["default","createAside"],mapping:{default:void 0,createAside:o.jsx(P,{})}},emptyWhileLoading:{control:"boolean"},disableAuthentication:{control:"boolean"},queryOptions:{control:"text"}}},n={render:({...e})=>o.jsx(i,{...e,children:o.jsxs(d,{children:[o.jsx(r,{source:"id"}),o.jsx(r,{source:"name"}),o.jsx(l,{source:"date"})]})}),wizardName:"pageWizard",info:{pageType:"Show",readonlyPageType:!0}},s={render:({...e})=>{const c=()=>{alert("Custom action result")},C=()=>o.jsx(T,{children:o.jsx(w,{color:"primary",onClick:c,label:"Custom Action"})});return o.jsx(i,{actions:o.jsx(C,{}),...e,children:o.jsxs(d,{children:[o.jsx(r,{source:"id"}),o.jsx(r,{source:"name"}),o.jsx(l,{source:"date"})]})})}},t={render:({...e})=>{const c=()=>o.jsx(A,{sx:{paddingX:4,paddingY:4,width:300},children:o.jsxs(f,{spacing:2,children:[o.jsx(a,{variant:"h6",children:"Aside content"}),o.jsx(a,{children:"Additional aside content"})]})});return o.jsx(i,{aside:o.jsx(c,{}),...e,children:o.jsxs(d,{children:[o.jsx(r,{source:"id"}),o.jsx(r,{source:"name"}),o.jsx(l,{source:"date"})]})})}},_=e=>o.jsx(v,{dataProvider:b,i18nProvider:F,children:o.jsx(k,{value:"users",children:o.jsx(e,{})})});var p,m,u;n.parameters={...n.parameters,docs:{...(p=n.parameters)==null?void 0:p.docs,source:{originalSource:`{
  render: ({
    ...props
  }) => {
    return <Show {...props}>
        <SimpleShowLayout>
          <TextField source="id" />
          <TextField source="name" />
          <DateField source="date" />
        </SimpleShowLayout>
      </Show>;
  },
  wizardName: "pageWizard",
  info: {
    pageType: "Show",
    readonlyPageType: true
  }
}`,...(u=(m=n.parameters)==null?void 0:m.docs)==null?void 0:u.source}}};var h,x,S;s.parameters={...s.parameters,docs:{...(h=s.parameters)==null?void 0:h.docs,source:{originalSource:`{
  render: ({
    ...props
  }) => {
    const handleClick = () => {
      alert("Custom action result");
    };
    const CustomActions = () => <TopToolbar>
        <Button color="primary" onClick={handleClick} label="Custom Action" />
      </TopToolbar>;
    return <Show actions={<CustomActions />} {...props}>
        <SimpleShowLayout>
          <TextField source="id" />
          <TextField source="name" />
          <DateField source="date" />
        </SimpleShowLayout>
      </Show>;
  }
}`,...(S=(x=s.parameters)==null?void 0:x.docs)==null?void 0:S.source}}};var j,g,y;t.parameters={...t.parameters,docs:{...(j=t.parameters)==null?void 0:j.docs,source:{originalSource:`{
  render: ({
    ...props
  }) => {
    const Aside = () => <Box sx={{
      paddingX: 4,
      paddingY: 4,
      width: 300
    }}>
        <Stack spacing={2}>
          <Typography variant="h6">Aside content</Typography>
          <Typography>Additional aside content</Typography>
        </Stack>
      </Box>;
    return <Show aside={<Aside />} {...props}>
        <SimpleShowLayout>
          <TextField source="id" />
          <TextField source="name" />
          <DateField source="date" />
        </SimpleShowLayout>
      </Show>;
  }
}`,...(y=(g=t.parameters)==null?void 0:g.docs)==null?void 0:y.source}}};const z=["Default","CustomActions","Aside"],Q=Object.freeze(Object.defineProperty({__proto__:null,Aside:t,CustomActions:s,Default:n,__namedExportsOrder:z,default:B},Symbol.toStringTag,{value:"Module"}));export{t as A,s as C,n as D,Q as S};
