import{n as e,o as t}from"./rolldown-runtime-C0FnF6B9.js";import{t as n}from"./react-C21x__mS.js";import{n as r}from"./iframe-GrlyTB2d.js";import{a as i,i as a}from"./utils-DUM89eIj.js";import{n as o,t as s}from"./FloatingPopover-CKJVdjqA.js";import{n as c,t as l}from"./ui.module-CiLQZm_L.js";import{a as u,i as d,r as f,t as p}from"./uiClasses-DiXn3Hc-.js";var m,h,g,_,v;function y(){return(y=e((()=>{m=`wLOHwj`,h=`lFsM-Y`,g=`LPob63`,_=`tsaGtv`,v={button:m,iconOnly:h,buttonInner:g,buttonIcon:_}})))()}var b,x,S;function C(){return(C=e((()=>{b=t(n(),1),a(),o(),l(),d(),y(),x=r(),S=(0,b.forwardRef)(function({children:e,disabled:t,className:n,icon:r,iconEnd:a,title:o,variant:l,tone:d,appearance:m,type:h=`button`,"aria-label":g,..._},y){let S=b.Children.count(e)>0,C=!!r&&!S,w=u({variant:l,tone:d,appearance:m,fallbackAppearance:d&&d!==`neutral`?`solid`:`outline`}),T=C?g??o:g,E=(0,x.jsx)(`button`,{..._,ref:y,type:h,disabled:t,"aria-label":T,className:i(c.uiElement,c.uiInputControl,v.button,f(w.tone),p(w.appearance),C?v.iconOnly:``,`textNoWrap`,n??``),children:(0,x.jsxs)(`span`,{className:v.buttonInner,children:[r&&!a&&(0,x.jsx)(`span`,{"aria-hidden":`true`,className:v.buttonIcon,children:r}),S&&(0,x.jsx)(`span`,{className:`flexEllipsis`,children:e}),r&&a&&(0,x.jsx)(`span`,{"aria-hidden":`true`,className:v.buttonIcon,children:r})]})});return o?(0,x.jsx)(s,{placement:`bottom`,tooltip:!0,content:(0,x.jsx)(x.Fragment,{children:o}),children:E}):E}),S.__docgenInfo={description:'Базовая кнопка дизайн-системы для пользовательских действий.\nПоддерживает состояния, tone + appearance, иконки и безопасный `type="button"` по умолчанию.',methods:[],displayName:`Button`,props:{variant:{required:!1,tsType:{name:`union`,raw:`| "transparent"
| "ghost"
| "neutral"
| "brand"
| "error"
| "warning"
| "success"
| "info"
| "neutralOutline"
| "brandOutline"
| "errorOutline"
| "warningOutline"
| "successOutline"
| "infoOutline"`,elements:[{name:`literal`,value:`"transparent"`},{name:`literal`,value:`"ghost"`},{name:`literal`,value:`"neutral"`},{name:`literal`,value:`"brand"`},{name:`literal`,value:`"error"`},{name:`literal`,value:`"warning"`},{name:`literal`,value:`"success"`},{name:`literal`,value:`"info"`},{name:`literal`,value:`"neutralOutline"`},{name:`literal`,value:`"brandOutline"`},{name:`literal`,value:`"errorOutline"`},{name:`literal`,value:`"warningOutline"`},{name:`literal`,value:`"successOutline"`},{name:`literal`,value:`"infoOutline"`}]},description:``},tone:{required:!1,tsType:{name:`union`,raw:`"neutral" | "brand" | "error" | "warning" | "success" | "info"`,elements:[{name:`literal`,value:`"neutral"`},{name:`literal`,value:`"brand"`},{name:`literal`,value:`"error"`},{name:`literal`,value:`"warning"`},{name:`literal`,value:`"success"`},{name:`literal`,value:`"info"`}]},description:``},appearance:{required:!1,tsType:{name:`union`,raw:`"solid" | "outline" | "ghost" | "transparent"`,elements:[{name:`literal`,value:`"solid"`},{name:`literal`,value:`"outline"`},{name:`literal`,value:`"ghost"`},{name:`literal`,value:`"transparent"`}]},description:``},icon:{required:!1,tsType:{name:`ReactReactNode`,raw:`React.ReactNode`},description:``},iconEnd:{required:!1,tsType:{name:`boolean`},description:``},type:{required:!1,tsType:{name:`union`,raw:`"button" | "submit" | "reset"`,elements:[{name:`literal`,value:`"button"`},{name:`literal`,value:`"submit"`},{name:`literal`,value:`"reset"`}]},description:`По умолчанию делаем безопасное поведение в формах.`,defaultValue:{value:`"button"`,computed:!1}}},composes:[`Omit`]}})))()}export{C as n,S as t};