import{React as n,jsxRuntimeExports as a}from"./vendor-react.js";import{twMerge as h,clsx as b,Slot$1 as v,cva as y,Overlay as i,Portal as w,Content as l,Close as N,X as j,Title as d,Description as c,Root$1 as D}from"./vendor-common.js";function s(...e){return h(b(e))}const R=y("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 focus-visible:outline-none",{variants:{variant:{default:"bg-primary !text-white shadow-sm hover:bg-primary/90",brand:"bg-brand !text-white shadow-sm hover:bg-brand/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-6",xl:"h-11 rounded-lg px-8 text-sm",xs:"h-7 rounded-md px-2.5 text-xs",icon:"h-9 w-9","icon-sm":"h-8 w-8","icon-xs":"h-7 w-7","icon-lg":"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),m=n.forwardRef(({className:e,variant:t,size:o,asChild:r=!1,type:g="button",...u},f)=>{const p=r?v:"button";return a.jsx(p,{className:s(R({variant:t,size:o,className:e})),ref:f,type:r?void 0:g,...u})});m.displayName="Button";const P=D,k=w,x=n.forwardRef(({className:e,...t},o)=>a.jsx(i,{ref:o,className:s("fixed inset-0 z-[100] bg-black/40 data-[state=open]:animate-in data-[state=closed]:animate-out",e),...t}));x.displayName=i.displayName;const z=n.forwardRef(({className:e,children:t,...o},r)=>a.jsxs(k,{children:[a.jsx(x,{}),a.jsxs(l,{ref:r,className:s("ax-dialog-content fixed left-[50%] top-[50%] z-[100] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg outline-none ring-0 duration-200 focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 data-[state=open]:animate-in data-[state=closed]:animate-out sm:rounded-lg",e),...o,children:[t,a.jsx(N,{asChild:!0,children:a.jsx(m,{type:"button",variant:"ghost",size:"icon-xs",className:"absolute right-4 top-4","aria-label":"关闭","data-dialog-close":"",children:a.jsx(j,{className:"h-4 w-4"})})})]})]}));z.displayName=l.displayName;const C=({className:e,...t})=>a.jsx("div",{className:s("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});C.displayName="DialogHeader";const _=({className:e,...t})=>a.jsx("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});_.displayName="DialogFooter";const B=n.forwardRef(({className:e,...t},o)=>a.jsx(d,{ref:o,className:s("m-0 text-lg font-semibold leading-none tracking-tight",e),...t}));B.displayName=d.displayName;const F=n.forwardRef(({className:e,...t},o)=>a.jsx(c,{ref:o,className:s("m-0 text-sm text-muted-foreground",e),...t}));F.displayName=c.displayName;export{m as Button,P as Dialog,z as DialogContent,F as DialogDescription,_ as DialogFooter,C as DialogHeader,B as DialogTitle,s as cn};
