import{a as e,i as t}from"./preload-helper-B45gAKPr.js";import{Nt as n,T as r,Tt as i,Y as a,n as o,t as s}from"./iframe-GmIo3IOR.js";import{n as c,t as l}from"./Button-Dk2YMZua.js";var u=e({Basic:()=>m,ComposableScheme:()=>g,Variants:()=>h,WithIcons:()=>_,__namedExportsOrder:()=>v,default:()=>p}),d,f,p,m,h,g,_,v,y=t((()=>{o(),c(),d=s(),{fn:f}=__STORYBOOK_MODULE_TEST__,p={title:`Shared/UI/Button`,component:l,args:{children:`Действие`,variant:`neutralOutline`,disabled:!1,iconEnd:!1,onClick:f()},parameters:{atomicCanvas:!0,layout:`padded`},argTypes:{children:{description:`Текстовое содержимое кнопки.`,control:`text`},variant:{description:"Готовая схема для обратной совместимости. Если заданы `tone` или `appearance`, они имеют приоритет.",control:`select`,options:[`neutral`,`neutralOutline`,`ghost`,`error`,`warning`,`success`,`info`,`errorOutline`,`warningOutline`,`successOutline`,`infoOutline`,`transparent`]},tone:{description:`Семантический тон кнопки.`,control:`inline-radio`,options:[`neutral`,`error`,`warning`,`success`,`info`]},appearance:{description:`Визуальная форма кнопки.`,control:`inline-radio`,options:[`solid`,`outline`,`ghost`,`transparent`]},icon:{description:`Иконка слева или справа от текста.`,control:!1},iconEnd:{description:`Перемещает иконку в конец кнопки.`,control:`boolean`},title:{description:"Текст тултипа и `aria-label` для кнопки.",control:`text`},disabled:{description:`Блокирует нажатие.`,control:`boolean`},onClick:{description:`Вызывается при нажатии на кнопку.`,control:!1},className:{description:`Дополнительный CSS-класс.`,control:`text`}}},m={},h={render:()=>(0,d.jsxs)(`div`,{style:{display:`grid`,gap:12,gridTemplateColumns:`repeat(auto-fit, minmax(180px, 1fr))`},children:[(0,d.jsx)(l,{variant:`neutral`,children:`Neutral Solid`}),(0,d.jsx)(l,{variant:`neutralOutline`,children:`Neutral Outline`}),(0,d.jsx)(l,{variant:`ghost`,children:`Ghost`}),(0,d.jsx)(l,{variant:`info`,children:`Info Solid`}),(0,d.jsx)(l,{variant:`success`,children:`Success Solid`}),(0,d.jsx)(l,{variant:`warning`,children:`Warning Solid`}),(0,d.jsx)(l,{variant:`error`,children:`Error Solid`}),(0,d.jsx)(l,{variant:`infoOutline`,children:`Info Outline`}),(0,d.jsx)(l,{variant:`successOutline`,children:`Success Outline`}),(0,d.jsx)(l,{variant:`warningOutline`,children:`Warning Outline`}),(0,d.jsx)(l,{variant:`errorOutline`,children:`Error Outline`}),(0,d.jsx)(l,{variant:`transparent`,children:`Transparent`})]}),args:{children:`Действие`}},g={render:()=>(0,d.jsxs)(`div`,{style:{display:`grid`,gap:12,gridTemplateColumns:`repeat(auto-fit, minmax(180px, 1fr))`},children:[(0,d.jsx)(l,{tone:`neutral`,appearance:`solid`,children:`Neutral Solid`}),(0,d.jsx)(l,{tone:`neutral`,appearance:`outline`,children:`Neutral Outline`}),(0,d.jsx)(l,{tone:`neutral`,appearance:`ghost`,children:`Neutral Ghost`}),(0,d.jsx)(l,{tone:`info`,appearance:`outline`,children:`Info Outline`}),(0,d.jsx)(l,{tone:`success`,appearance:`solid`,children:`Success Solid`}),(0,d.jsx)(l,{tone:`error`,appearance:`transparent`,children:`Error Transparent`})]})},_={render:()=>(0,d.jsxs)(`div`,{style:{display:`flex`,gap:12,flexWrap:`wrap`},children:[(0,d.jsx)(l,{icon:(0,d.jsx)(a,{}),children:`Скачать`}),(0,d.jsx)(l,{icon:(0,d.jsx)(r,{}),tone:`info`,appearance:`solid`,children:`Создать`}),(0,d.jsx)(l,{icon:(0,d.jsx)(i,{}),iconEnd:!0,tone:`success`,appearance:`solid`,children:`Подтвердить`}),(0,d.jsx)(l,{icon:(0,d.jsx)(n,{}),title:`Уведомления`})]}),args:{children:`Действие`}},m.parameters={...m.parameters,docs:{...m.parameters?.docs,source:{originalSource:`{
  // play: async function ({ args, canvas, userEvent }) {
  // 	const button = canvas.getByRole("button", { name: /button/i });
  // 	// 👇 Simulate behavior
  // 	await userEvent.click(button);
  // 	// 👇 Make assertions
  // 	await expect(button).toBeVisible();
  // 	await expect(args.onClick).not.toHaveBeenCalled();
  // }
}`,...m.parameters?.docs?.source}}},h.parameters={...h.parameters,docs:{...h.parameters?.docs,source:{originalSource:`{
  render: () => <div style={{
    display: "grid",
    gap: 12,
    gridTemplateColumns: "repeat(auto-fit, minmax(180px, 1fr))"
  }}>
            <Button variant="neutral">Neutral Solid</Button>
            <Button variant="neutralOutline">Neutral Outline</Button>
            <Button variant="ghost">Ghost</Button>
            <Button variant="info">Info Solid</Button>
            <Button variant="success">Success Solid</Button>
            <Button variant="warning">Warning Solid</Button>
            <Button variant="error">Error Solid</Button>
            <Button variant="infoOutline">Info Outline</Button>
            <Button variant="successOutline">Success Outline</Button>
            <Button variant="warningOutline">Warning Outline</Button>
            <Button variant="errorOutline">Error Outline</Button>
            <Button variant="transparent">Transparent</Button>
        </div>,
  args: {
    children: "Действие"
  }
}`,...h.parameters?.docs?.source}}},g.parameters={...g.parameters,docs:{...g.parameters?.docs,source:{originalSource:`{
  render: () => <div style={{
    display: "grid",
    gap: 12,
    gridTemplateColumns: "repeat(auto-fit, minmax(180px, 1fr))"
  }}>
            <Button tone="neutral" appearance="solid">
                Neutral Solid
            </Button>
            <Button tone="neutral" appearance="outline">
                Neutral Outline
            </Button>
            <Button tone="neutral" appearance="ghost">
                Neutral Ghost
            </Button>
            <Button tone="info" appearance="outline">
                Info Outline
            </Button>
            <Button tone="success" appearance="solid">
                Success Solid
            </Button>
            <Button tone="error" appearance="transparent">
                Error Transparent
            </Button>
        </div>
}`,...g.parameters?.docs?.source}}},_.parameters={..._.parameters,docs:{..._.parameters?.docs,source:{originalSource:`{
  render: () => <div style={{
    display: "flex",
    gap: 12,
    flexWrap: "wrap"
  }}>
            <Button icon={<DownloadIcon />}>Скачать</Button>
            <Button icon={<PlusIcon />} tone="info" appearance="solid">
                Создать
            </Button>
            <Button icon={<CheckIcon />} iconEnd tone="success" appearance="solid">
                Подтвердить
            </Button>
            <Button icon={<BellIcon />} title="Уведомления" />
        </div>,
  args: {
    children: "Действие"
  }
}`,..._.parameters?.docs?.source}}},v=[`Basic`,`Variants`,`ComposableScheme`,`WithIcons`]}));y();export{m as Basic,g as ComposableScheme,h as Variants,_ as WithIcons,v as __namedExportsOrder,p as default,y as n,u as t};