import{d as l}from"./useDispatchDragSession-C_EL-ucI.js";import{_ as p}from"./DispatchJobcardBlock.vue_vue_type_script_setup_true_lang-udceCePr.js";import{d as f,o as s,a,f as r,t as d,F as h,n as b,j as n,b as g}from"./app-D9-EssCM.js";const x={class:"flex min-h-0 flex-1 flex-col overflow-hidden rounded-xl border border-slate-200 bg-white"},y={class:"flex shrink-0 items-center justify-between border-b border-slate-100 px-3 py-2"},k={class:"rounded-full bg-slate-100 px-2 py-0.5 text-xs text-slate-700"},v={class:"min-h-0 flex-1 space-y-2 overflow-y-auto p-2"},D=["onDragstart","onClick"],w={class:"p-2"},N={class:"mt-2 space-y-0.5 border-t border-slate-100 pt-2 text-[10px] text-slate-600"},S={key:0},C={key:1},q={key:2},B={key:0,class:"rounded-lg border border-dashed border-slate-200 bg-slate-50 p-3 text-center text-xs text-slate-500"},J=f({__name:"UnscheduledJobcardList",props:{jobcards:{},conflictIds:{}},emits:["select"],setup(E,{emit:c}){const u=c,_=(t,o)=>{const e=o.estimated_duration_minutes??60;l.value={id:o.id,kind:"queue",estimatedMinutes:e},t.dataTransfer?.setData("application/x-jobcard-dispatch",JSON.stringify({id:o.id,kind:"queue",estimatedMinutes:e})),t.dataTransfer.effectAllowed="move"},m=()=>{l.value=null};return(t,o)=>(s(),a("div",x,[r("div",y,[o[0]||(o[0]=r("h3",{class:"text-sm font-semibold text-slate-900"},"Queue",-1)),r("span",k,d(t.jobcards.length),1)]),r("div",v,[(s(!0),a(h,null,b(t.jobcards,e=>(s(),a("button",{key:e.id,type:"button",draggable:"true",class:"block w-full rounded-lg border border-slate-200 bg-white text-left transition hover:border-indigo-300 hover:shadow-sm",onDragstart:i=>_(i,e),onDragend:m,onClick:i=>u("select",e)},[r("div",w,[g(p,{job:e,compact:!1,"conflict-ids":t.conflictIds},null,8,["job","conflict-ids"]),r("div",N,[e.due_date?(s(),a("p",S,"Due: "+d(e.due_date),1)):e.start_date?(s(),a("p",C,"Start: "+d(e.start_date),1)):n("",!0),e.estimated_duration_minutes?(s(),a("p",q,"Est. "+d(e.estimated_duration_minutes)+" min",1)):n("",!0)])])],40,D))),128)),t.jobcards.length===0?(s(),a("p",B," No jobcards in this queue. ")):n("",!0)])]))}});export{J as _};
