import{c as u,u as x,f as U,a as i,b as g,B as v}from"./button-D5r5edT8.js";import{j as o,r as l,v as Y}from"./app-BGey7YPf.js";import{j as y,R as Z,P as J,W as Q,c as X,C as ee,a as ae,T as te,k as oe,l as h,O as se,m as re}from"./index-BFyaOBDQ.js";import{T as le}from"./trash-Blc6Iqr5.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 ne=[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],ie=u("OctagonAlert",ne);/**
 * @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 ce=[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]],Me=u("PenLine",ce);/**
 * @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 de=[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]],Ee=u("ThumbsDown",de);/**
 * @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 pe=[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]],Pe=u("ThumbsUp",pe);/**
 * @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 me=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Se=u("Trash2",me);function Oe(e,a=30){if(!e)return"";const t=e.trim().split(/\s+/);return t.length>a?t.slice(0,a).join(" ")+"...":e}var D="AlertDialog",[ue,$e]=X(D,[y]),n=y(),N=e=>{const{__scopeAlertDialog:a,...t}=e,s=n(a);return o.jsx(Z,{...s,...t,modal:!0})};N.displayName=D;var ge="AlertDialogTrigger",fe=l.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...s}=e,r=n(t);return o.jsx(re,{...r,...s,ref:a})});fe.displayName=ge;var Ae="AlertDialogPortal",j=e=>{const{__scopeAlertDialog:a,...t}=e,s=n(a);return o.jsx(J,{...s,...t})};j.displayName=Ae;var ve="AlertDialogOverlay",_=l.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...s}=e,r=n(t);return o.jsx(se,{...r,...s,ref:a})});_.displayName=ve;var d="AlertDialogContent",[xe,ye]=ue(d),he=U("AlertDialogContent"),b=l.forwardRef((e,a)=>{const{__scopeAlertDialog:t,children:s,...r}=e,p=n(t),c=l.useRef(null),K=x(a,c),f=l.useRef(null);return o.jsx(Q,{contentName:d,titleName:w,docsSlug:"alert-dialog",children:o.jsx(xe,{scope:t,cancelRef:f,children:o.jsxs(ee,{role:"alertdialog",...p,...r,ref:K,onOpenAutoFocus:ae(r.onOpenAutoFocus,m=>{var A;m.preventDefault(),(A=f.current)==null||A.focus({preventScroll:!0})}),onPointerDownOutside:m=>m.preventDefault(),onInteractOutside:m=>m.preventDefault(),children:[o.jsx(he,{children:s}),o.jsx(Ne,{contentRef:c})]})})})});b.displayName=d;var w="AlertDialogTitle",R=l.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...s}=e,r=n(t);return o.jsx(te,{...r,...s,ref:a})});R.displayName=w;var T="AlertDialogDescription",k=l.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...s}=e,r=n(t);return o.jsx(oe,{...r,...s,ref:a})});k.displayName=T;var De="AlertDialogAction",C=l.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...s}=e,r=n(t);return o.jsx(h,{...r,...s,ref:a})});C.displayName=De;var M="AlertDialogCancel",E=l.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...s}=e,{cancelRef:r}=ye(M,t),p=n(t),c=x(a,r);return o.jsx(h,{...p,...s,ref:c})});E.displayName=M;var Ne=({contentRef:e})=>{const a=`\`${d}\` requires a description for the component to be accessible for screen reader users.

You can add a description to the \`${d}\` by passing a \`${T}\` component as a child, which also benefits sighted users by adding visible context to the dialog.

Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${d}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.

For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return l.useEffect(()=>{var s;document.getElementById((s=e.current)==null?void 0:s.getAttribute("aria-describedby"))||console.warn(a)},[a,e]),null},je=N,_e=j,P=_,S=b,O=C,$=E,H=R,I=k;const be=je,we=_e,L=l.forwardRef(({className:e,...a},t)=>o.jsx(P,{className:i("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...a,ref:t}));L.displayName=P.displayName;const z=l.forwardRef(({className:e,...a},t)=>o.jsxs(we,{children:[o.jsx(L,{}),o.jsx(S,{ref:t,className:i("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a})]}));z.displayName=S.displayName;const V=({className:e,...a})=>o.jsx("div",{className:i("flex flex-col space-y-2 text-center sm:text-left",e),...a});V.displayName="AlertDialogHeader";const F=({className:e,...a})=>o.jsx("div",{className:i("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...a});F.displayName="AlertDialogFooter";const B=l.forwardRef(({className:e,...a},t)=>o.jsx(H,{ref:t,className:i("text-lg font-semibold",e),...a}));B.displayName=H.displayName;const W=l.forwardRef(({className:e,...a},t)=>o.jsx(I,{ref:t,className:i("text-sm text-muted-foreground",e),...a}));W.displayName=I.displayName;const q=l.forwardRef(({className:e,...a},t)=>o.jsx(O,{ref:t,className:i(g(),e),...a}));q.displayName=O.displayName;const G=l.forwardRef(({className:e,...a},t)=>o.jsx($,{ref:t,className:i(g({variant:"outline"}),"mt-2 sm:mt-0",e),...a}));G.displayName=$.displayName;function He({open:e,onOpenChange:a,url:t}){const{delete:s}=Y(),r=()=>{s(t,{preserveScroll:!0,onSuccess:()=>{a(!1)}})},p=c=>{c.key==="Enter"&&(c.preventDefault(),r())};return o.jsx(be,{open:e,onOpenChange:a,children:o.jsxs(z,{onKeyDown:p,children:[o.jsxs(V,{className:"items-center text-center",children:[o.jsxs(B,{children:[o.jsx("div",{className:"mb-2 mx-auto flex h-14 w-14 items-center justify-center rounded-full bg-destructive/10",children:o.jsx(ie,{className:"h-7 w-7 text-destructive"})}),"Konfirmasi Hapus"]}),o.jsx(W,{className:"text-[15px]",children:"Apakah Anda yakin ingin menghapus data ini? Tindakan ini tidak dapat dibatalkan."})]}),o.jsxs(F,{className:"mt-4 sm:justify-center gap-2",children:[o.jsx(G,{asChild:!0,children:o.jsx(v,{variant:"outline",className:"flex items-center gap-1",children:"Batal"})}),o.jsx(q,{asChild:!0,className:g({variant:"destructive"}),onClick:r,children:o.jsxs(v,{className:"flex items-center gap-1",children:[o.jsx(le,{className:"h-4 w-4"}),"Hapus"]})})]})]})})}export{He as M,Me as P,Se as T,Pe as a,Ee as b,Oe as t};
