import{aa as j,r as n,j as e,I as u,B as t}from"./index-Dbk1Plmn.js";import{D as C,a as f,b as m,c as D,d as v,e as R,f as k}from"./dialog-CIA-8Qg9.js";import{L}from"./label-BKULM0qV.js";/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const E=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],y=j("RotateCcw",E);function B({trigger:r,title:i,description:l,confirmLabel:c="Confirm",variant:d="default",showReason:h,onConfirm:x}){const[p,a]=n.useState(!1),[s,o]=n.useState("");return e.jsxs(C,{open:p,onOpenChange:a,children:[e.jsx(f,{asChild:!0,children:r}),e.jsxs(m,{children:[e.jsxs(D,{children:[e.jsx(v,{children:i}),e.jsx(R,{children:l})]}),h&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx(L,{htmlFor:"reason",children:"Reason (optional)"}),e.jsx(u,{id:"reason",value:s,onChange:g=>o(g.target.value),placeholder:"Enter reason…"})]}),e.jsxs(k,{children:[e.jsx(t,{variant:"outline",onClick:()=>a(!1),children:"Cancel"}),e.jsx(t,{variant:d,onClick:()=>{x(s||void 0),a(!1),o("")},children:c})]})]})]})}export{B as C,y as R};
