import{a as e,t}from"./react-D0JuimcS.js";import{o as n}from"./utils-Dac180Gn.js";import{t as r}from"./copy-thc8hJoe.js";import{t as i}from"./pencil-COtUf-LL.js";import{t as a}from"./trash-2-D_alEpce.js";import{$a as o,Ka as s,aa as c,ga as l,ia as u,oa as d,po as f,sa as p}from"./index-BP3TYB4i.js";import{t as m}from"./approval-actions-LKMeSekL.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)(d,{delayDuration:200,children:[y&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(u,{children:[(0,g.jsx)(p,{asChild:!0,children:(0,g.jsx)(l,{variant:`ghost`,size:`icon`,className:`size-8`,onClick:()=>x(!0),children:(0,g.jsx)(s,{className:`size-4`})})}),(0,g.jsx)(c,{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)(u,{children:[(0,g.jsx)(p,{asChild:!0,children:(0,g.jsx)(l,{variant:`ghost`,size:`icon`,className:`size-8`,onClick:e,children:(0,g.jsx)(f,{className:`size-4`})})}),(0,g.jsx)(c,{children:`View`})]}),t&&(0,g.jsxs)(u,{children:[(0,g.jsx)(p,{asChild:!0,children:(0,g.jsx)(l,{variant:`ghost`,size:`icon`,className:`size-8`,onClick:t,children:(0,g.jsx)(i,{className:`size-4`})})}),(0,g.jsx)(c,{children:`Edit`})]}),_&&(0,g.jsxs)(u,{children:[(0,g.jsx)(p,{asChild:!0,children:(0,g.jsx)(l,{variant:`ghost`,size:`icon`,className:`size-8`,onClick:_,children:(0,g.jsx)(r,{className:`size-4`})})}),(0,g.jsx)(c,{children:`Clone`})]}),v&&(0,g.jsxs)(u,{children:[(0,g.jsx)(p,{asChild:!0,children:(0,g.jsx)(l,{variant:`ghost`,size:`icon`,className:`size-8`,onClick:v,children:(0,g.jsx)(o,{className:`size-4`})})}),(0,g.jsx)(c,{children:`Print`})]}),n&&(0,g.jsxs)(u,{children:[(0,g.jsx)(p,{asChild:!0,children:(0,g.jsx)(l,{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)(c,{children:`Delete`})]})]})})}export{_ as t};