import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./react-BatatxyT.js";import{s as n}from"./utils-BO1RPuol.js";import{t as r}from"./copy-DX9AFgmO.js";import{t as i}from"./pencil-BqU8IP9o.js";import{t as a}from"./trash-2-C4tYX-tx.js";import{Aa as o,Da as s,Io as c,Oa as l,So as u,ho as d,ka as f,za as p}from"./index-CsuVxiRQ.js";import{t as m}from"./approval-actions-CkNc5EP7.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)(f,{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)(u,{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};