import{U as c}from"./util-CWVrglD_.js";import{d as x,V as y,r as o,h as C,o as h,i as k,j as _,A as b,aG as S,dg as v,ac as P}from"./index-9PRMimni.js";const V=x({__name:"ColumnItem",props:{data:{}},emits:["select"],setup(w,{emit:i}){const u=i,{t:a}=y(),d=[{label:a("hsqe.planner.assignedReport"),key:"assignedReport"},{label:a("hsqe.planner.edit"),key:"edit"},{label:"Delete",key:"delete"},{label:"Log",key:"auditLog"}],t=o(!1),l=o(0),s=o(0);function p(e){if(e){const r=c.getPlannerStateWithValue(e).backgroundColor,n=c.getPlannerStateWithValue(e).color;return{"background-color":r,"font-family":"PingFang SC, PingFang SC",color:n}}else return{"background-color":"#4C6DDE","font-family":"PingFang SC, PingFang SC",color:"red"}}function m(e){u("select",e),t.value=!1}function f(e){e.preventDefault(),t.value=!1,P().then(()=>{t.value=!0,l.value=e.clientX,s.value=e.clientY})}function g(){t.value=!1}return(e,r)=>{const n=v;return h(),C("div",null,[k("div",{class:"mt-1 w-full box-border py-[5px] px-[2px] rounded-[1px] text-[14px] text-pretty text-start",style:S(p(Number(e.data.status))),onContextmenu:f},b(e.data.exerciseProjectName),37),_(n,{placement:"bottom-start",onSelect:m,trigger:"manual",x:l.value,y:s.value,options:d,show:t.value,"on-clickoutside":g},null,8,["x","y","show"])])}}});export{V as default};
