import{V as b,d as S,bk as y,a4 as w,r,h as q,o as I,i as N,j as p,w as O,p as R,A as V,l as d,hX as E,aG as T,dg as D,ac as P,v as j}from"./index-9PRMimni.js";const{t:a}=b();class B{plannerStates=[{value:0,label:a("hsqe.planner.open"),backgroundColor:"rgba(144, 137, 216, 0.85)"},{value:2,label:a("hsqe.planner.due15Day"),backgroundColor:"rgba(239, 223, 9, 0.85)"},{value:3,label:a("hsqe.planner.pendingExtension"),backgroundColor:"rgba(224, 155, 65, 0.85)"},{value:4,label:a("hsqe.planner.extensionOk"),backgroundColor:"rgba(36, 149, 238, 0.85)"},{value:5,label:a("hsqe.planner.assignedReportOk"),backgroundColor:"rgba(206, 130, 212, 0.85)"},{value:6,label:a("hsqe.planner.completed"),backgroundColor:"rgba(109, 180, 132, 0.85)"},{value:7,label:a("hsqe.planner.overdue"),backgroundColor:"rgba(224, 108, 99, 0.85)"},{value:8,label:a("hsqe.planner.cancellation"),backgroundColor:"rgba(161, 159, 176, 0.85)"}];getPlannerStateWithValue(o){const n=this.plannerStates.findIndex(l=>l.value===o);if(n>-1)return this.plannerStates[n];throw new Error(`Invalid planner value: ${o}`)}}const U=new B,W={class:"overflow-hidden"},z=S({__name:"ColumnItem",props:{data:{}},emits:["select"],setup(c,{emit:o}){const n=c,l=o,{t:s}=b(),g=y(),m=w(()=>{const e=[{label:s("hsqe.planner.assignedReport"),key:"assignedReport"},{label:s("hsqe.planner.edit"),key:"edit"},{label:s("hsqe.planner.cancel"),key:"cancel"}];return n.data.enableAssignedReport||delete e[0],n.data.enableEdit||delete e[1],n.data.enableCancel||delete e[2],e}),t=r(!1),u=r(0),i=r(0);function f(e){return{"background-color":U.getPlannerStateWithValue(e).backgroundColor}}function h(e){l("select",e),t.value=!1}function v(e){e.preventDefault(),t.value=!1,P().then(()=>{t.value=!0,u.value=e.clientX,i.value=e.clientY})}function _(){t.value=!1}return(e,x)=>{const k=E,C=D;return I(),q("div",W,[N("div",{class:"mt-3 w-[120px] box-border pt-[3px] px-[5px] rounded-[5px] text-[12px] text-white font-bold text-pretty vessel-colums cursor-pointer transition-transform duration-200 hover:scale-105 transform-gpu",style:T(f(Number(e.data.currentStatus))),onContextmenu:v},[p(k,{"line-clamp":2},{default:O(()=>[R(V(d(g).getLocale==="en"?e.data.subTypeName:e.data.subTypeNameCn),1)]),_:1})],36),p(C,{placement:"bottom-start",onSelect:h,trigger:"manual",x:u.value,y:i.value,options:d(m),show:t.value,"on-clickoutside":_},null,8,["x","y","options","show"])])}}}),A=j(z,[["__scopeId","data-v-3f95231b"]]),M=Object.freeze(Object.defineProperty({__proto__:null,default:A},Symbol.toStringTag,{value:"Module"}));export{A as C,U,M as a};
