import{a as e,t}from"./react-DK-MTtD8.js";import{s as n}from"./utils-CXcsdpX-.js";import{t as r}from"./copy-BkHsFo7s.js";import{t as i}from"./pencil-hHQSbk2R.js";import{t as a}from"./trash-2-DKuDAThN.js";import{Aa as o,Da as s,Fo as c,Oa as l,ka as u,mo as d,xo as f,za as p}from"./index-Ct5uU080.js";import{t as m}from"./approval-actions-ynPgEknE.js";var h=e(t(),1),g=n();function _({onView:e,onEdit:t,onDelete:n,onClone:_,onPrint:v,approval:y}){let[b,x]=(0,h.useState)(!1);return(0,g.jsx)(`div`,{className:`flex items-center gap-0.5`,onClick:e=>e.stopPropagation(),children:(0,g.jsxs)(u,{delayDuration:200,children:[y&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(s,{children:[(0,g.jsx)(o,{asChild:!0,children:(0,g.jsx)(p,{variant:`ghost`,size:`icon`,className:`size-8`,onClick:()=>x(!0),children:(0,g.jsx)(d,{className:`size-4`})})}),(0,g.jsx)(l,{children:`Authorization Details`})]}),(0,g.jsx)(m,{entityType:y.entityType,objectId:y.objectId,contentTypeId:y.contentTypeId,authorizedStatus:y.authorizedStatus,onApprovalChange:y.onApprovalChange,externalOpen:b,onExternalOpenChange:x})]}),e&&(0,g.jsxs)(s,{children:[(0,g.jsx)(o,{asChild:!0,children:(0,g.jsx)(p,{variant:`ghost`,size:`icon`,className:`size-8`,onClick:e,children:(0,g.jsx)(c,{className:`size-4`})})}),(0,g.jsx)(l,{children:`View`})]}),t&&(0,g.jsxs)(s,{children:[(0,g.jsx)(o,{asChild:!0,children:(0,g.jsx)(p,{variant:`ghost`,size:`icon`,className:`size-8`,onClick:t,children:(0,g.jsx)(i,{className:`size-4`})})}),(0,g.jsx)(l,{children:`Edit`})]}),_&&(0,g.jsxs)(s,{children:[(0,g.jsx)(o,{asChild:!0,children:(0,g.jsx)(p,{variant:`ghost`,size:`icon`,className:`size-8`,onClick:_,children:(0,g.jsx)(r,{className:`size-4`})})}),(0,g.jsx)(l,{children:`Clone`})]}),v&&(0,g.jsxs)(s,{children:[(0,g.jsx)(o,{asChild:!0,children:(0,g.jsx)(p,{variant:`ghost`,size:`icon`,className:`size-8`,onClick:v,children:(0,g.jsx)(f,{className:`size-4`})})}),(0,g.jsx)(l,{children:`Print`})]}),n&&(0,g.jsxs)(s,{children:[(0,g.jsx)(o,{asChild:!0,children:(0,g.jsx)(p,{variant:`ghost`,size:`icon`,className:`size-8 text-destructive hover:text-destructive`,onClick:n,children:(0,g.jsx)(a,{className:`size-4`})})}),(0,g.jsx)(l,{children:`Delete`})]})]})})}export{_ as t};