import{a as e,n as t}from"./chunk-BneVvdWh.js";import{t as n}from"./react-C7IZe2D1.js";import{C as r,J as i,K as a,Y as o,n as s,t as c,tt as l,w as u}from"./dist-DtfJeYQK.js";import{t as d}from"./jsx-runtime-C2wGStra.js";import{n as f,t as p}from"./Text-at08VF1d.js";import{r as m,t as h}from"./storybook-utils-BfrlMSeG.js";function g({variant:e}){let[t,n]=e.split(`-`),r=s(l[t][n].body.fontSize);return(0,_.jsxs)(`tr`,{children:[(0,_.jsx)(`td`,{style:{paddingRight:16,whiteSpace:`nowrap`,textAlign:`right`},children:(0,_.jsx)(p,{variant:e,children:e},e)}),(0,_.jsx)(`td`,{children:r})]})}var _,v,y,b,x,S,C;t((()=>{u(),c(),e(n(),1),f(),h(),_=d(),v={title:`components/Text`,component:p,argTypes:{variant:{description:m},centered:{description:m}}},y=()=>(0,_.jsx)(p,{children:`Lorem ipsum`}),y.tags=[`!test`],y.parameters={chromatic:{disableSnapshot:!0}},b=()=>{let e=r(o.background.primaryInverted);return(0,_.jsx)(_.Fragment,{children:a.map(({id:t})=>(0,_.jsx)(`div`,{style:{backgroundColor:[`inverted`,`branded`,`selected`].includes(t)?e:void 0},children:(0,_.jsx)(p,{accent:t,children:t})},t))})},x=()=>(0,_.jsxs)(`table`,{style:{borderCollapse:`separate`,borderSpacing:`16px`},children:[(0,_.jsx)(`thead`,{children:(0,_.jsxs)(`tr`,{children:[(0,_.jsx)(`th`,{children:`Variant`}),(0,_.jsx)(`th`,{children:`font-size`})]})}),i.map(({id:e})=>(0,_.jsx)(g,{variant:e},e))]}),S={parameters:{chromatic:{disableSnapshot:!0}},decorators:[(e,{args:t})=>(0,_.jsx)(`div`,{style:{backgroundColor:t.accent===`inverted`?`black`:void 0},children:e()})],args:{children:`Lorem ipsum dolor sit amet`,variant:`default-regular`,dataset:{qaid:`text`}},argTypes:{dataset:{control:`object`},children:{control:`text`},variant:{control:`select`},accent:{control:`select`},centered:{control:`boolean`},strong:{table:{disable:!0}}}},y.parameters={...y.parameters,docs:{...y.parameters?.docs,source:{originalSource:`() => <Text>Lorem ipsum</Text>`,...y.parameters?.docs?.source}}},b.parameters={...b.parameters,docs:{...b.parameters?.docs,source:{originalSource:`() => {
  const grey = getTokenVar(color.background.primaryInverted);
  return <>
            {TEXT_ACCENT_OPTIONS.map(({
      id
    }) => <div key={id} style={{
      backgroundColor: ['inverted', 'branded', 'selected'].includes(id) ? grey : undefined
    }}>
                    <Text accent={id}>{id}</Text>
                </div>)}
        </>;
}`,...b.parameters?.docs?.source}}},x.parameters={...x.parameters,docs:{...x.parameters?.docs,source:{originalSource:`() => <table style={{
  borderCollapse: 'separate',
  borderSpacing: '16px'
}}>
        <thead>
            <tr>
                <th>Variant</th>
                <th>font-size</th>
            </tr>
        </thead>
        {TEXT_VARIANT_OPTIONS.map(({
    id: variant
  }) => <VariantRow key={variant} variant={variant} />)}
    </table>`,...x.parameters?.docs?.source}}},S.parameters={...S.parameters,docs:{...S.parameters?.docs,source:{originalSource:`{
  parameters: {
    chromatic: {
      disableSnapshot: true
    }
  },
  decorators: [(story, {
    args
  }) => <div style={{
    backgroundColor: args.accent === 'inverted' ? 'black' : undefined
  }}>
                {story()}
            </div>],
  args: {
    children: 'Lorem ipsum dolor sit amet',
    variant: 'default-regular',
    dataset: {
      qaid: 'text'
    }
  },
  argTypes: {
    dataset: {
      control: 'object'
    },
    children: {
      control: 'text'
    },
    variant: {
      control: 'select'
    },
    accent: {
      control: 'select'
    },
    centered: {
      control: 'boolean'
    },
    strong: {
      table: {
        disable: true
      }
    }
  }
}`,...S.parameters?.docs?.source}}},C=[`Base`,`Accents`,`Variants`,`Playground`]}))();export{b as Accents,y as Base,S as Playground,x as Variants,C as __namedExportsOrder,v as default};