import{r as V,c as $,o as We,aO as nt,_ as rt,s as dt,v as ut,i as Se,w as v,g as u,b as i,d,a as m,j as x,n as P,e as t,F as M,k as T,t as y,aS as Ie,af as Pe,aR as He,h as Ne}from"./index-QAlcqU00.js";import{u as ct}from"./useWorkOrders-CVmaGBfy.js";import{u as mt}from"./useMobileOptimization-Ds6Eb1bE.js";import{F as pt,a as vt}from"./FPPageHeader-CFIwZZgQ.js";import{T as ft,P as gt,A as ht}from"./AudioRecorder-BzlZ8cXI.js";import{T as yt}from"./TimeTracker-DBp8PrtX.js";import{C as bt,S as wt}from"./StatusHistory-C7FtpZlE.js";import{W as kt}from"./WorkOrderIdGenerator-2pnsJNJL.js";import{R as xt}from"./ReportGenerator-Dld_SPXF.js";import{F as ie}from"./FPInput-D5RURom0.js";import{F as Tt}from"./FPCheckbox-DcRYwN3n.js";import{F as U}from"./FPSelect-j7n_x8eB.js";import{F as Vt}from"./FPTable-CWvngIYd.js";import{F as St}from"./FPModal-DMoPysvU.js";import{F as Ce}from"./FPBadge-DvOitM1C.js";import{F as Be}from"./FPTabs-qq-Tmb7J.js";import{F as $e}from"./FPFileUpload-Bk17EQTg.js";import{_ as Ct}from"./FormRestoreNotification-2Wflg1mH.js";import"./useFormAutoSave-BrW9Wl2Q.js";import"./workOrder-jNxj_kjQ.js";function Mt(){const le=V(!1),l=V(null),H=V("portrait"),ne=V({width:window.innerWidth||0,height:window.innerHeight||0,isSmall:!1,isMedium:!1,isLarge:!1}),f=new Map,Z=new Set,O=new Map;let E=new Map,j=new Map;const ve=$(()=>{const o=navigator.userAgent.toLowerCase();return/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(o)}),re=$(()=>"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0||window.matchMedia&&window.matchMedia("(pointer: coarse)").matches),fe=()=>{const o=window.innerWidth,r=window.innerHeight;ne.value={width:o,height:r,isSmall:o<768,isMedium:o>=768&&o<1024,isLarge:o>=1024}},ge=()=>{window.orientation!==void 0?H.value=Math.abs(window.orientation)===90?"landscape":"portrait":H.value=window.innerWidth>window.innerHeight?"landscape":"portrait"},_e=(o,r={})=>{const{onTouchStart:c,onTouchMove:n,onTouchEnd:w,onTap:D,onLongPress:h}=r;let N=0,S=null;const C=k=>{N=Date.now();const B=k.touches[0];O.set(o,{startX:B.clientX,startY:B.clientY,startTime:N}),h&&(S=setTimeout(()=>{h(k)},500)),c&&c(k)},Y=k=>{S&&(clearTimeout(S),S=null),n&&n(k)},L=k=>{const me=Date.now()-N;S&&(clearTimeout(S),S=null),D&&me<500&&D(k),w&&w(k),O.delete(o)};o.addEventListener("touchstart",C,{passive:!0}),o.addEventListener("touchmove",Y,{passive:!0}),o.addEventListener("touchend",L,{passive:!0}),f.has(o)||f.set(o,[]),f.get(o).push(["touchstart",C],["touchmove",Y],["touchend",L])},Q=(o,r={})=>{const{onSwipeLeft:c,onSwipeRight:n,onSwipeUp:w,onSwipeDown:D}=r,h=S=>{const C=S.touches[0];O.set(o,{startX:C.clientX,startY:C.clientY,startTime:Date.now()})},N=S=>{const C=O.get(o);if(!C)return;const Y=S.changedTouches[0],L=Y.clientX-C.startX,k=Y.clientY-C.startY,B=Math.sqrt(L*L+k*k),me=Date.now()-C.startTime;if(B<50){O.delete(o);return}let X=null;Math.abs(L)>Math.abs(k)?X=L>0?"right":"left":X=k>0?"down":"up";const se={direction:X,distance:B,duration:me};switch(X){case"left":c&&c(se);break;case"right":n&&n(se);break;case"up":w&&w(se);break;case"down":D&&D(se);break}O.delete(o)};o.addEventListener("touchstart",h,{passive:!0}),o.addEventListener("touchend",N,{passive:!0}),f.has(o)||f.set(o,[]),f.get(o).push(["touchstart",h],["touchend",N])},he=(o,r={})=>{o.style.fontSize="16px",o.style.minHeight="44px",r.inputMode&&o.setAttribute("inputmode",r.inputMode),r.autocomplete&&o.setAttribute("autocomplete",r.autocomplete),o.classList.add("mobile-form-field"),o.addEventListener("focus",()=>{le.value=!0,l.value="focus"}),o.addEventListener("blur",()=>{le.value=!1,l.value="blur"})},ye=(o,r={})=>{o.style.minHeight="44px",o.style.minWidth="44px",o.classList.add("mobile-touch-feedback"),b(o),o.style.touchAction="manipulation",console.log("[MobileFormControls] Button enhanced for mobile")},be=o=>{o.style.fontSize="16px",o.style.appearance="none",o.style.webkitAppearance="none",o.style.mozAppearance="none",o.style.minHeight="44px",console.log("[MobileFormControls] Select enhanced for mobile")},we=(o,r)=>{const n={numeric:{inputmode:"numeric",pattern:"[0-9]*",autocomplete:"off"},email:{inputmode:"email",autocomplete:"email"},tel:{inputmode:"tel",autocomplete:"tel"},search:{inputmode:"search",autocomplete:"off"},url:{inputmode:"url",autocomplete:"url"}}[r];n&&Object.entries(n).forEach(([w,D])=>{o.setAttribute(w,D)}),console.log(`[MobileFormControls] Input optimized for ${r}`)},K=(o,r={})=>{o.style.minWidth="44px",o.style.minHeight="44px",o.classList.add("mobile-focus-enhanced"),r.voiceLabel&&o.setAttribute("aria-label",r.voiceLabel),o.style.outline="none",o.style.transition="box-shadow 0.2s ease",console.log("[MobileFormControls] Accessibility enhanced")},J=()=>{const o=document.querySelector('meta[name="viewport"]');if(o){const r=o.getAttribute("content");r.includes("user-scalable=no")||o.setAttribute("content",r+", user-scalable=no")}},Ee=()=>{const o=document.querySelector('meta[name="viewport"]');if(o){const c=o.getAttribute("content").replace(", user-scalable=no",", user-scalable=yes");o.setAttribute("content",c)}},ee=()=>{const o=document.documentElement;o.style.setProperty("--safe-area-inset-top","env(safe-area-inset-top)"),o.style.setProperty("--safe-area-inset-right","env(safe-area-inset-right)"),o.style.setProperty("--safe-area-inset-bottom","env(safe-area-inset-bottom)"),o.style.setProperty("--safe-area-inset-left","env(safe-area-inset-left)")},te=(o,r=250)=>(...c)=>{const n=o.toString();E.has(n)&&clearTimeout(E.get(n));const w=setTimeout(()=>{o(...c),E.delete(n)},r);E.set(n,w)},de=(o,r=16)=>(...c)=>{const n=o.toString();if(!j.has(n)){o(...c);const w=setTimeout(()=>{j.delete(n)},r);j.set(n,w)}},ke=o=>{const r=te(o);window.addEventListener("resize",r),f.has(window)||f.set(window,[]),f.get(window).push(["resize",r])},ue=(o,r)=>{const c=de(r);o.addEventListener("scroll",c,{passive:!0}),f.has(o)||f.set(o,[]),f.get(o).push(["scroll",c])},z=o=>{const r=()=>{ge(),o(H.value)};window.addEventListener("orientationchange",r),window.addEventListener("resize",r),f.has(window)||f.set(window,[]),f.get(window).push(["orientationchange",r],["resize",r])},g=(o,r)=>{ce(o);const c=document.createElement("div");c.className="mobile-validation-error",c.textContent=r,c.style.color="#ef4444",c.style.fontSize="14px",c.style.marginTop="4px",o.parentNode.insertBefore(c,o.nextSibling)},ce=o=>{const r=o.nextElementSibling;r&&r.classList.contains("mobile-validation-error")&&r.remove()},De=(o,r)=>{const c=()=>{const n=r(o.value);n?g(o,n):ce(o)};o.addEventListener("blur",c),f.has(o)||f.set(o,[]),f.get(o).push(["blur",c])},G=o=>{o.classList.add("mobile-modal"),o.style.position="fixed",o.style.top="0",o.style.left="0",o.style.right="0",o.style.bottom="0",o.style.zIndex="9999",console.log("[MobileFormControls] Modal enhanced for mobile")},A=(o,r)=>{Q(o,{onSwipeDown:c=>{c.distance>100&&r()}})},q=o=>{o.disabled=!0,o.classList.add("mobile-loading"),o.dataset.originalContent||(o.dataset.originalContent=o.innerHTML),o.innerHTML="⟳ Loading..."},oe=o=>{o.disabled=!1,o.classList.remove("mobile-loading"),o.dataset.originalContent&&(o.innerHTML=o.dataset.originalContent,delete o.dataset.originalContent)},b=o=>{o.style.position="relative",o.style.overflow="hidden";const r=c=>{const n=o.getBoundingClientRect(),w=c.touches[0].clientX-n.left,D=c.touches[0].clientY-n.top,h=document.createElement("span");h.style.position="absolute",h.style.borderRadius="50%",h.style.background="rgba(255, 255, 255, 0.3)",h.style.transform="scale(0)",h.style.animation="ripple 0.6s linear",h.style.left=`${w-10}px`,h.style.top=`${D-10}px`,h.style.width="20px",h.style.height="20px",o.appendChild(h),setTimeout(()=>{h.remove()},600)};o.addEventListener("touchstart",r,{passive:!0})},F=(o,r)=>{if(window.ResizeObserver){const c=new ResizeObserver(r);return c.observe(o),Z.add(c),c}return null},I=()=>{f.forEach((o,r)=>{o.forEach(([c,n])=>{r.removeEventListener(c,n)})}),f.clear(),Z.forEach(o=>{o.disconnect()}),Z.clear(),E.forEach(o=>clearTimeout(o)),j.forEach(o=>clearTimeout(o)),E.clear(),j.clear(),console.log("[MobileFormControls] Cleanup completed")};return We(()=>{fe(),ge(),ee(),ke(fe),z(()=>{console.log("[MobileFormControls] Orientation changed to:",H.value)}),console.log("[MobileFormControls] Mobile form controls initialized")}),nt(()=>{I()}),{isMobileDevice:ve,isTouchDevice:re,isKeyboardVisible:le,lastInteraction:l,orientation:H,screenSize:ne,addTouchHandlers:_e,addSwipeHandlers:Q,enhanceFormField:he,enhanceButton:ye,enhanceSelect:be,optimizeInputForMobile:we,enhanceAccessibility:K,preventZoomOnInput:J,restoreZoom:Ee,adjustForSafeArea:ee,onResize:ke,onScroll:ue,onOrientationChange:z,debounce:te,throttle:de,showValidationError:g,clearValidationError:ce,addMobileValidation:De,enhanceModalForMobile:G,addSwipeToDismiss:A,showMobileLoading:q,hideMobileLoading:oe,observeResize:F,cleanup:I}}const _t={key:0},Et={key:0},Dt={class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Ut={key:0,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 10h16M4 14h16M4 18h16"},At={key:1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"},Ft={key:0},Lt={key:1},Rt={class:"p-6"},Ot={key:0},zt={class:"font-medium text-gray-900"},It={class:"text-sm text-gray-600 mt-1"},Pt={key:0,class:"flex items-center"},Ht={class:"text-sm text-gray-900"},Nt={key:1,class:"text-sm text-gray-400"},Bt={class:"text-sm text-gray-900"},$t={key:1,class:"text-sm text-gray-400"},Wt={class:"flex items-center space-x-2"},jt={key:1,class:"space-y-4"},Gt={key:0,class:"flex items-center justify-center py-12"},qt={key:1,class:"text-center py-12"},Yt={key:2},Xt=["onClick"],Zt={class:"flex items-start justify-between mb-3"},Qt={class:"flex-1 min-w-0"},Kt={class:"text-lg font-medium text-gray-900 truncate"},Jt={class:"text-sm text-gray-600 mt-1 line-clamp-2"},eo={class:"flex flex-col items-end space-y-2 ml-4"},to={class:"grid grid-cols-2 gap-4 text-sm"},oo={key:0,class:"flex items-center mt-1"},so={class:"text-gray-900 truncate"},ao={key:1,class:"text-gray-400"},io={key:1,class:"text-gray-400 mt-1 block"},lo={class:"flex items-center justify-between mt-4 pt-3 border-t border-gray-100"},no={class:"text-sm text-gray-500"},ro={class:"flex space-x-2"},uo={class:"border-b border-gray-200 mb-6"},co={class:"min-h-[400px]"},mo={key:0,class:"space-y-4"},po={class:"mt-6 border-t pt-6"},vo={key:1,class:"space-y-4"},fo={key:2,class:"space-y-4"},go={class:"mt-6 border-t pt-6"},ho={key:3,class:"space-y-4"},yo={key:4,class:"space-y-6"},bo={class:"border-2 border-dashed border-gray-300 rounded-lg p-6 text-center hover:border-gray-400 transition-colors"},wo={class:"mt-4"},ko={class:"cursor-pointer"},xo={key:0,class:"mt-4 space-y-2"},To={class:"flex items-center"},Vo={class:"text-sm font-medium text-gray-900"},So={class:"text-xs text-gray-500"},Co={class:"mt-2 text-xs text-gray-500"},Mo={class:"mt-2"},_o={key:5,class:"space-y-4"},Eo={class:"mt-6 border-t pt-6"},Do={class:"mt-6 border-t pt-6"},Uo={class:"mt-6 border-t pt-6"},Ao={class:"flex items-center justify-between"},Fo={class:"flex items-center space-x-4"},Lo={key:0,class:"flex items-center text-sm text-gray-500"},Ro={key:0,class:"w-4 h-4 mr-2 text-amber-500 animate-pulse",fill:"currentColor",viewBox:"0 0 20 20"},Oo={key:1,class:"w-4 h-4 mr-2 text-green-500",fill:"currentColor",viewBox:"0 0 20 20"},zo={key:2},Io={key:3},Po={class:"flex space-x-3"},Ho={__name:"WorkOrdersListView",setup(je){const pe=ut(),Me=dt(),{loading:_,workOrders:W,pagination:le,workOrderForm:l,uploadingFiles:H,uploadProgress:ne,priorityOptions:f,assetOptions:Z,locationOptions:O,userOptions:E,teamOptions:j,categoryOptions:ve,searchWorkOrders:re,createWorkOrder:fe,updateWorkOrder:ge,loadDropdownOptions:_e,resetForm:Q,formatPriority:he,formatStatus:ye,getPriorityBadge:be,getStatusBadge:we,hasUnsavedChanges:K,lastSaveTime:J,restoreFormData:Ee,clearSavedData:ee,hasSavedData:te,getSavedDataInfo:de,markUserInteraction:ke,finishInitialization:ue,WORK_ORDER_STATUS:z}=ct(),{isMobile:g,screenSize:ce,optimizeTableForMobile:De}=mt();Mt();const G=V(!1),A=V("create"),q=V("all"),oe=V(null),b=V("basic"),F=V(null),I=V(!1),o=V(!1),r=V(null),c=$(()=>[{key:"basic",label:g.value?"Basic":"Basic Info"},{key:"assignment",label:g.value?"Assign":"Assignment"},{key:"scheduling",label:g.value?"Schedule":"Scheduling"},{key:"parts",label:"Parts"},{key:"attachments",label:g.value?"Files":"Attachments"},{key:"options",label:"Options"}]),n=V({search:"",status:"",priority:"",assignee:"",asset:"",location:"",category:""}),w=$(()=>[{key:"all",label:"All Orders",badge:W.value.length},{key:"open",label:"Open",badge:W.value.filter(a=>a.status===z.OPEN).length},{key:"in_progress",label:"In Progress",badge:W.value.filter(a=>a.status===z.IN_PROGRESS).length},{key:"complete",label:"Complete",badge:W.value.filter(a=>a.status===z.COMPLETE).length}]),D=$(()=>De([{key:"title",label:"Work Order",sortable:!0,priority:"high",essential:!0},{key:"status",label:"Status",sortable:!0,priority:"high"},{key:"priority",label:"Priority",sortable:!0,priority:"medium"},{key:"assignee",label:"Assignee",sortable:!0,priority:"medium"},{key:"createdAt",label:"Created",sortable:!0,priority:"low"},{key:"dueDate",label:"Due Date",sortable:!0,priority:"medium"}])),h=$(()=>{let a=W.value;if(q.value!=="all"){const e={open:z.OPEN,in_progress:z.IN_PROGRESS,complete:z.COMPLETE};a=a.filter(s=>s.status===e[q.value])}if(n.value.search){const e=n.value.search.toLowerCase();a=a.filter(s=>{var p,R;return((p=s.title)==null?void 0:p.toLowerCase().includes(e))||((R=s.description)==null?void 0:R.toLowerCase().includes(e))})}return n.value.priority&&(a=a.filter(e=>e.priority===n.value.priority)),n.value.assignee&&(a=a.filter(e=>{var s,p;return((s=e.assignedTo)==null?void 0:s.some(R=>R.id==n.value.assignee))||((p=e.primaryUser)==null?void 0:p.id)==n.value.assignee})),n.value.asset&&(a=a.filter(e=>{var s;return((s=e.asset)==null?void 0:s.id)==n.value.asset})),n.value.location&&(a=a.filter(e=>{var s;return((s=e.location)==null?void 0:s.id)==n.value.location})),n.value.category&&(a=a.filter(e=>{var s;return((s=e.category)==null?void 0:s.id)==n.value.category})),a}),N=$(()=>{const a=A.value==="create"?"Create Work Order":"Edit Work Order";return K.value?`${a} (Unsaved Changes)`:a}),S=$(()=>{if(!J.value)return"";const a=new Date,e=new Date(J.value),s=a-e,p=Math.floor(s/(60*1e3));return p<1?"just now":p===1?"1 minute ago":p<60?`${p} minutes ago`:e.toLocaleTimeString()}),C=async()=>{await re()},Y=()=>{pe.push("/work-orders/calendar")},L=()=>{A.value="create",oe.value=null,b.value="basic",k(),te()||(Q(),Oe(),ue()),G.value=!0},k=()=>{console.log("Checking for saved data...",{modalMode:A.value,hasSaved:te(),savedInfo:de()}),A.value==="create"&&te()?(r.value=de(),o.value=!0,console.log("Showing restore notification with data:",r.value)):console.log("No saved data found or not in create mode")},B=()=>{var a,e,s;Ee()&&(o.value=!1,ke(),console.log("Form data restored successfully"),((a=l.audioRecordings)!=null&&a.some(p=>p._hadBlobUrl)||(e=l.image)!=null&&e._isFile||(s=l.files)!=null&&s.some(p=>p._isFile))&&console.warn("Note: Audio recordings, images, and uploaded files cannot be restored after page refresh. Only metadata was preserved."))},me=()=>{o.value=!1,ee(),Q(),Oe(),ue(),console.log("Auto-saved data dismissed and form reset")},X=a=>{const e=W.value.find(s=>s.id===a);e&&(A.value="edit",oe.value=a,b.value="basic",Object.assign(l,e),ue(),G.value=!0)},se=a=>{b.value=a},Ae=a=>{const e=c.findIndex(s=>s.key===b.value);a==="next"&&e0&&(b.value=c[e-1].key)},xe=a=>{pe.push(`/work-orders/${a}`)},Ue=()=>{ee(),G.value=!1,Q(),o.value=!1},Fe=async()=>{try{A.value==="create"?await fe():await ge(oe.value,l),ee(),Ue()}catch(a){console.error("Failed to save work order:",a)}},Ge=a=>{q.value=a},ae=()=>{const a={searchValue:n.value.search,filterFields:[]};n.value.priority&&a.filterFields.push({field:"priority",operation:"EQUAL",values:[n.value.priority]}),n.value.assignee&&a.filterFields.push({field:"assignedTo",operation:"EQUAL",values:[n.value.assignee]}),n.value.asset&&a.filterFields.push({field:"asset",operation:"EQUAL",values:[n.value.asset]}),n.value.location&&a.filterFields.push({field:"location",operation:"EQUAL",values:[n.value.location]}),n.value.category&&a.filterFields.push({field:"category",operation:"EQUAL",values:[n.value.category]}),re(a)},qe=({column:a,direction:e})=>{console.log("Sort:",a,e)},Ye=a=>{re({page:a-1})},Xe=({row:a})=>{xe(a.id)},Ze=()=>{I.value=!I.value},Qe=a=>{xe(a.id)},Te=a=>a?new Date(a).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"No date",Le=a=>{if(!a)return"text-gray-400";const e=new Date(a),p=Math.ceil((e-new Date)/(1e3*60*60*24));return p<0?"text-red-600":p<=3?"text-orange-600":"text-gray-900"},Re=a=>{if(a.primaryUser)return`${a.primaryUser.firstName} ${a.primaryUser.lastName}`;if(a.assignedTo&&a.assignedTo.length>0){const e=a.assignedTo[0],s=`${e.firstName} ${e.lastName}`,p=a.assignedTo.length-1;return p>0?`${s} +${p}`:s}return"Unassigned"},Ve=a=>{var e;return a.primaryUser||((e=a.assignedTo)==null?void 0:e[0])||null},Ke=async a=>{console.log("Primary image uploaded:",a)},Je=async a=>{console.log("Additional files uploaded:",a)},et=a=>{l.status=a.newStatus;const e={id:Date.now()+Math.random(),action:"STATUS_CHANGE",field:"status",oldValue:a.previousStatus,newValue:a.newStatus,user:a.user,timestamp:new Date().toISOString(),description:`Status changed from ${a.previousStatus} to ${a.newStatus}`};l.auditTrail||(l.auditTrail=[]),l.auditTrail.unshift(e),console.log("Status changed:",a)},tt=a=>{console.log("Report generated:",a);const e={id:Date.now()+Math.random(),action:"REPORT_GENERATED",field:"report",newValue:a.name,user:F.value,timestamp:new Date().toISOString(),description:`Generated report: ${a.name}`};l.auditTrail||(l.auditTrail=[]),l.auditTrail.unshift(e)},ot=a=>{console.log("Recording saved:",a);const e={id:Date.now()+Math.random(),action:"AUDIO_RECORDED",field:"audioRecordings",newValue:a.title||"Untitled Recording",user:F.value,timestamp:new Date().toISOString(),description:`Added audio recording: ${a.title||"Untitled Recording"} (${Math.round(a.duration||0)}s)`};l.auditTrail||(l.auditTrail=[]),l.auditTrail.unshift(e)},st=a=>{const e=Array.from(a.target.files);if(!e.length)return;const s=e.map(p=>({...p,id:Date.now()+Math.random(),uploadedAt:new Date().toISOString(),uploadedBy:F.value}));l.files||(l.files=[]),l.files.push(...s),a.target.value=""},at=a=>{l.files&&l.files[a]&&l.files.splice(a,1)},it=a=>{if(!a)return"0 B";const e=["B","KB","MB","GB"],s=Math.floor(Math.log(a)/Math.log(1024));return`${Math.round(a/Math.pow(1024,s)*100)/100} ${e[s]}`},lt=a=>{if(!a)return"just now";const e=new Date(a),p=new Date-e,R=Math.floor(p/(1e3*60));if(R<1)return"just now";if(R<60)return`${R}m ago`;const ze=Math.floor(R/60);return ze<24?`${ze}h ago`:e.toLocaleDateString()},Oe=()=>{if(F.value&&!l.primaryUser&&(l.primaryUser=F.value.id),!l.estimatedStartDate){const a=new Date;a.setMinutes(a.getMinutes()-a.getTimezoneOffset()),l.estimatedStartDate=a.toISOString().slice(0,16)}l.files||(l.files=[]),l.audioRecordings||(l.audioRecordings=[]),l.tasks||(l.tasks=[]),l.parts||(l.parts=[])};return We(async()=>{try{if(await _e(),await C(),g.value&&ce.value.width<768&&(I.value=!0),g.value,Me.query.create==="true"){const a=Me.query.assetId;setTimeout(()=>{a&&(l.assetId=parseInt(a)),L(),pe.replace({path:"/work-orders"})},500)}}catch(a){console.error("Failed to initialize work orders view:",a)}}),(a,e)=>(u(),Se(pt,null,{header:v(()=>[d(vt,{title:"Work Orders",description:"Manage and track all maintenance work orders",breadcrumbs:[{text:"Work Orders",to:null}]},{actions:v(()=>[d(t(M),{variant:"outline",size:"sm",onClick:C},{default:v(()=>[(u(),m("svg",{class:P(["w-4 h-4",t(g)?"":"mr-2"]),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},e[32]||(e[32]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)]),2)),t(g)?x("",!0):(u(),m("span",_t,"Refresh"))]),_:1}),d(t(M),{variant:"outline",size:"sm",onClick:Y},{default:v(()=>[(u(),m("svg",{class:P(["w-4 h-4",t(g)?"":"mr-2"]),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},e[33]||(e[33]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"},null,-1)]),2)),t(g)?x("",!0):(u(),m("span",Et,"Calendar View"))]),_:1}),t(g)?(u(),Se(t(M),{key:0,variant:"outline",size:"sm",onClick:Ze},{default:v(()=>[(u(),m("svg",Dt,[I.value?(u(),m("path",Ut)):(u(),m("path",At))]))]),_:1})):x("",!0),d(t(M),{variant:"primary",size:"sm",onClick:L},{default:v(()=>[(u(),m("svg",{class:P(["w-4 h-4",t(g)?"":"mr-2"]),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},e[34]||(e[34]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"},null,-1)]),2)),t(g)?(u(),m("span",Lt,"Create")):(u(),m("span",Ft,"Create Work Order"))]),_:1})]),tabs:v(()=>[d(t(Be),{modelValue:q.value,"onUpdate:modelValue":e[0]||(e[0]=s=>q.value=s),tabs:w.value,onTabChange:Ge},null,8,["modelValue","tabs"])]),_:1})]),default:v(()=>[i("div",Rt,[i("div",{class:P(["mb-6 grid gap-4",t(g)?"grid-cols-1":"grid-cols-1 md:grid-cols-3 lg:grid-cols-6"])},[d(t(ie),{modelValue:n.value.search,"onUpdate:modelValue":e[1]||(e[1]=s=>n.value.search=s),placeholder:"Search work orders...",onInput:ae},{prepend:v(()=>e[35]||(e[35]=[i("svg",{class:"w-4 h-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)])),_:1},8,["modelValue"]),d(t(U),{modelValue:n.value.priority,"onUpdate:modelValue":[e[2]||(e[2]=s=>n.value.priority=s),ae],placeholder:"Filter by Priority",options:t(f)},null,8,["modelValue","options"]),d(t(U),{modelValue:n.value.assignee,"onUpdate:modelValue":[e[3]||(e[3]=s=>n.value.assignee=s),ae],placeholder:"Filter by Assignee",options:t(E)},null,8,["modelValue","options"]),d(t(U),{modelValue:n.value.asset,"onUpdate:modelValue":[e[4]||(e[4]=s=>n.value.asset=s),ae],placeholder:"Filter by Asset",options:t(Z)},null,8,["modelValue","options"]),d(t(U),{modelValue:n.value.location,"onUpdate:modelValue":[e[5]||(e[5]=s=>n.value.location=s),ae],placeholder:"Filter by Location",options:t(O)},null,8,["modelValue","options"]),d(t(U),{modelValue:n.value.category,"onUpdate:modelValue":[e[6]||(e[6]=s=>n.value.category=s),ae],placeholder:"Filter by Category",options:t(ve)},null,8,["modelValue","options"])],2),!t(g)||!I.value?(u(),m("div",Ot,[d(t(Vt),{columns:D.value,data:h.value,loading:t(_),pagination:t(le),"empty-message":"No work orders found",onSortChange:qe,onPageChange:Ye,onRowClick:Xe},{"column-title":v(({row:s})=>[i("div",null,[i("h4",zt,y(s.title),1),i("p",It,y(s.description),1)])]),"column-status":v(({row:s})=>[d(t(Ce),{variant:t(we)(s.status)},{default:v(()=>[T(y(t(ye)(s.status)),1)]),_:2},1032,["variant"])]),"column-priority":v(({row:s})=>[d(t(Ce),{variant:t(be)(s.priority)},{default:v(()=>[T(y(t(he)(s.priority)),1)]),_:2},1032,["variant"])]),"column-assignee":v(({row:s})=>[Ve(s)?(u(),m("div",Pt,[d(t(Ie),{user:Ve(s),size:"sm",class:"mr-3"},null,8,["user"]),i("span",Ht,y(Re(s)),1)])):(u(),m("span",Nt,"Unassigned"))]),"column-createdAt":v(({row:s})=>[i("div",Bt,y(Te(s.createdAt)),1)]),"column-dueDate":v(({row:s})=>[s.dueDate?(u(),m("div",{key:0,class:P(["text-sm",Le(s.dueDate)])},y(Te(s.dueDate)),3)):(u(),m("span",$t,"No due date"))]),"row-actions":v(({row:s})=>[i("div",Wt,[d(t(M),{variant:"ghost",size:"sm",onClick:p=>xe(s.id)},{default:v(()=>e[36]||(e[36]=[T(" View ",-1)])),_:2,__:[36]},1032,["onClick"]),d(t(M),{variant:"ghost",size:"sm",onClick:p=>X(s.id)},{default:v(()=>e[37]||(e[37]=[T(" Edit ",-1)])),_:2,__:[37]},1032,["onClick"])])]),_:1},8,["columns","data","loading","pagination"])])):t(g)&&I.value?(u(),m("div",jt,[t(_)?(u(),m("div",Gt,e[38]||(e[38]=[i("div",{class:"flex items-center space-x-2 text-gray-500"},[i("svg",{class:"w-6 h-6 animate-spin",fill:"none",viewBox:"0 0 24 24"},[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]),i("span",null,"Loading work orders...")],-1)]))):h.value.length===0?(u(),m("div",qt,e[39]||(e[39]=[i("div",{class:"text-gray-500"},[i("svg",{class:"w-12 h-12 mx-auto mb-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5H7a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})]),i("p",{class:"text-lg font-medium"},"No work orders found"),i("p",{class:"text-sm mt-1"},"Try adjusting your filters or create a new work order")],-1)]))):(u(),m("div",Yt,[(u(!0),m(Pe,null,He(h.value,s=>(u(),m("div",{key:s.id,class:"bg-white rounded-lg shadow border border-gray-200 p-4 touch-manipulation",onClick:p=>Qe(s)},[i("div",Zt,[i("div",Qt,[i("h3",Kt,y(s.title),1),i("p",Jt,y(s.description),1)]),i("div",eo,[d(t(Ce),{variant:t(we)(s.status)},{default:v(()=>[T(y(t(ye)(s.status)),1)]),_:2},1032,["variant"]),d(t(Ce),{variant:t(be)(s.priority)},{default:v(()=>[T(y(t(he)(s.priority)),1)]),_:2},1032,["variant"])])]),i("div",to,[i("div",null,[e[40]||(e[40]=i("span",{class:"text-gray-500"},"Assignee:",-1)),Ve(s)?(u(),m("div",oo,[d(t(Ie),{user:Ve(s),size:"xs",class:"mr-2"},null,8,["user"]),i("span",so,y(Re(s)),1)])):(u(),m("span",ao,"Unassigned"))]),i("div",null,[e[41]||(e[41]=i("span",{class:"text-gray-500"},"Due Date:",-1)),s.dueDate?(u(),m("div",{key:0,class:P(["mt-1",Le(s.dueDate)])},y(Te(s.dueDate)),3)):(u(),m("span",io,"No due date"))])]),i("div",lo,[i("div",no," Created "+y(Te(s.createdAt)),1),i("div",ro,[d(t(M),{variant:"ghost",size:"xs",onClick:Ne(p=>X(s.id),["stop"])},{default:v(()=>e[42]||(e[42]=[T(" Edit ",-1)])),_:2,__:[42]},1032,["onClick"]),d(t(M),{variant:"ghost",size:"xs",onClick:Ne(p=>xe(s.id),["stop"])},{default:v(()=>e[43]||(e[43]=[T(" View ",-1)])),_:2,__:[43]},1032,["onClick"])])])],8,Xt))),128))]))])):x("",!0)]),d(t(St),{modelValue:G.value,"onUpdate:modelValue":e[31]||(e[31]=s=>G.value=s),title:N.value,size:t(g)?"full":"xl",onConfirm:Fe,onCancel:Ue},{footer:v(()=>[i("div",Ao,[i("div",Fo,[t(K)||t(J)?(u(),m("div",Lo,[t(K)?(u(),m("svg",Ro,e[59]||(e[59]=[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z","clip-rule":"evenodd"},null,-1)]))):(u(),m("svg",Oo,e[60]||(e[60]=[i("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"},null,-1)]))),t(K)?(u(),m("span",zo,"Auto-saving...")):t(J)?(u(),m("span",Io,"Last saved "+y(S.value),1)):x("",!0)])):x("",!0),b.value!=="basic"?(u(),Se(t(M),{key:1,variant:"outline",size:"sm",onClick:e[29]||(e[29]=s=>Ae("previous"))},{default:v(()=>e[61]||(e[61]=[T(" ← Previous ",-1)])),_:1,__:[61]})):x("",!0)]),i("div",Po,[d(t(M),{variant:"secondary",onClick:Ue},{default:v(()=>e[62]||(e[62]=[T(" Cancel ",-1)])),_:1,__:[62]}),b.value!=="options"?(u(),Se(t(M),{key:0,variant:"outline",onClick:e[30]||(e[30]=s=>Ae("next"))},{default:v(()=>e[63]||(e[63]=[T(" Next → ",-1)])),_:1,__:[63]})):x("",!0),d(t(M),{variant:"primary",loading:t(_),onClick:Fe},{default:v(()=>[T(y(A.value==="create"?"Create Work Order":"Update Work Order"),1)]),_:1},8,["loading"])])])]),default:v(()=>[i("div",uo,[d(t(Be),{modelValue:b.value,"onUpdate:modelValue":e[7]||(e[7]=s=>b.value=s),tabs:c.value,onTabChange:se},null,8,["modelValue","tabs"])]),d(t(Ct),{visible:o.value,"saved-data-info":r.value,onRestore:B,onDismiss:me},null,8,["visible","saved-data-info"]),i("div",co,[b.value==="basic"?(u(),m("div",mo,[d(kt,{modelValue:t(l).workOrderId,"onUpdate:modelValue":e[8]||(e[8]=s=>t(l).workOrderId=s),category:t(l).category,location:t(l).location,disabled:t(_),"allow-manual-entry":!0},null,8,["modelValue","category","location","disabled"]),d(t(ie),{modelValue:t(l).title,"onUpdate:modelValue":e[9]||(e[9]=s=>t(l).title=s),label:"Title",placeholder:"Enter work order title",required:""},null,8,["modelValue"]),d(t(ie),{modelValue:t(l).description,"onUpdate:modelValue":e[10]||(e[10]=s=>t(l).description=s),label:"Description",placeholder:"Enter work order description",type:"textarea",rows:"4"},null,8,["modelValue"]),i("div",{class:P(["grid gap-4",t(g)?"grid-cols-1":"grid-cols-1 md:grid-cols-2"])},[d(t(U),{modelValue:t(l).priority,"onUpdate:modelValue":e[11]||(e[11]=s=>t(l).priority=s),label:"Priority",options:t(f),required:""},null,8,["modelValue","options"]),d(t(U),{modelValue:t(l).category,"onUpdate:modelValue":e[12]||(e[12]=s=>t(l).category=s),label:"Category",options:t(ve),placeholder:"Select category"},null,8,["modelValue","options"])],2),i("div",{class:P(["grid gap-4",t(g)?"grid-cols-1":"grid-cols-1 md:grid-cols-2"])},[d(t(U),{modelValue:t(l).asset,"onUpdate:modelValue":e[13]||(e[13]=s=>t(l).asset=s),label:"Asset",options:t(Z),placeholder:"Select asset"},null,8,["modelValue","options"]),d(t(U),{modelValue:t(l).location,"onUpdate:modelValue":e[14]||(e[14]=s=>t(l).location=s),label:"Location",options:t(O),placeholder:"Select location"},null,8,["modelValue","options"])],2),i("div",po,[d(ft,{modelValue:t(l).tasks,"onUpdate:modelValue":e[15]||(e[15]=s=>t(l).tasks=s),disabled:t(_),"show-templates":!0},null,8,["modelValue","disabled"])])])):x("",!0),b.value==="assignment"?(u(),m("div",vo,[d(t(U),{modelValue:t(l).primaryUser,"onUpdate:modelValue":e[16]||(e[16]=s=>t(l).primaryUser=s),label:"Primary Assignee",options:t(E),placeholder:"Select primary user"},null,8,["modelValue","options"]),d(t(U),{modelValue:t(l).team,"onUpdate:modelValue":e[17]||(e[17]=s=>t(l).team=s),label:"Team",options:t(j),placeholder:"Select team"},null,8,["modelValue","options"]),e[44]||(e[44]=i("div",{class:"bg-gray-50 p-4 rounded-lg"},[i("h4",{class:"text-sm font-medium text-gray-900 mb-2"},"Assignment Notes"),i("p",{class:"text-sm text-gray-600"}," The primary assignee will be the main person responsible for this work order. If a team is selected, all team members will have access to this work order. ")],-1))])):x("",!0),b.value==="scheduling"?(u(),m("div",fo,[i("div",{class:P(["grid gap-4",t(g)?"grid-cols-1":"grid-cols-1 md:grid-cols-2"])},[d(t(ie),{modelValue:t(l).estimatedStartDate,"onUpdate:modelValue":e[18]||(e[18]=s=>t(l).estimatedStartDate=s),label:"Planned Start Date",type:"datetime-local"},null,8,["modelValue"]),d(t(ie),{modelValue:t(l).dueDate,"onUpdate:modelValue":e[19]||(e[19]=s=>t(l).dueDate=s),label:"Due Date",type:"datetime-local"},null,8,["modelValue"])],2),d(t(ie),{modelValue:t(l).estimatedDuration,"onUpdate:modelValue":e[20]||(e[20]=s=>t(l).estimatedDuration=s),label:"Estimated Duration (hours)",type:"number",min:"0",step:"0.5",placeholder:"e.g. 2.5"},null,8,["modelValue"]),e[45]||(e[45]=i("div",{class:"bg-blue-50 p-4 rounded-lg"},[i("h4",{class:"text-sm font-medium text-blue-900 mb-2"},"Scheduling Tips"),i("ul",{class:"text-sm text-blue-800 space-y-1"},[i("li",null,"• Set realistic start and due dates based on priority and complexity"),i("li",null,"• Estimated duration helps with resource planning"),i("li",null,"• Consider dependencies on other work orders"),i("li",null,"• Start date defaults to current time for immediate work")])],-1)),i("div",go,[d(yt,{modelValue:t(l).timeEntries,"onUpdate:modelValue":e[21]||(e[21]=s=>t(l).timeEntries=s),disabled:t(_),"user-options":t(E),"current-user":F.value},null,8,["modelValue","disabled","user-options","current-user"])])])):x("",!0),b.value==="parts"?(u(),m("div",ho,[d(gt,{modelValue:t(l).parts,"onUpdate:modelValue":e[22]||(e[22]=s=>t(l).parts=s),disabled:t(_)},null,8,["modelValue","disabled"])])):x("",!0),b.value==="attachments"?(u(),m("div",yo,[i("div",null,[e[46]||(e[46]=i("label",{class:"block text-sm font-medium text-gray-700 mb-2"}," Primary Image ",-1)),e[47]||(e[47]=i("p",{class:"text-sm text-gray-500 mb-3"}," Upload a main image that represents this work order (before photos, equipment images, etc.) ",-1)),d(t($e),{modelValue:t(l).image,"onUpdate:modelValue":e[23]||(e[23]=s=>t(l).image=s),accept:"image/*",multiple:!1,uploading:t(H),"upload-progress":t(ne),onFilesAdded:Ke},null,8,["modelValue","uploading","upload-progress"])]),i("div",null,[e[48]||(e[48]=i("label",{class:"block text-sm font-medium text-gray-700 mb-2"}," Audio Notes ",-1)),e[49]||(e[49]=i("p",{class:"text-sm text-gray-500 mb-3"}," Record voice notes, observations, or instructions for this work order ",-1)),d(ht,{modelValue:t(l).audioRecordings,"onUpdate:modelValue":e[24]||(e[24]=s=>t(l).audioRecordings=s),"work-order-id":A.value==="edit"?oe.value:null,"current-user":F.value,"auto-transcribe":!0,"enable-visualization":!0,"auto-save":!1,onRecordingSaved:ot},null,8,["modelValue","work-order-id","current-user"])]),i("div",null,[e[56]||(e[56]=i("label",{class:"block text-sm font-medium text-gray-700 mb-2"}," Additional Files ",-1)),e[57]||(e[57]=i("p",{class:"text-sm text-gray-500 mb-3"}," Upload manuals, documentation, additional photos, or other relevant files ",-1)),i("div",bo,[e[51]||(e[51]=i("svg",{class:"mx-auto h-12 w-12 text-gray-400",stroke:"currentColor",fill:"none",viewBox:"0 0 48 48"},[i("path",{d:"M28 8H12a4 4 0 00-4 4v20m32-12v8m0 0v8a4 4 0 01-4 4H12a4 4 0 01-4-4v-4m32-4l-3.172-3.172a4 4 0 00-5.656 0L28 28M8 32l9.172-9.172a4 4 0 015.656 0L28 28m0 0l4 4m4-24h8m-4-4v8m-12 4h.02","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),i("div",wo,[i("label",ko,[e[50]||(e[50]=i("span",{class:"mt-2 block text-sm font-medium text-gray-900"}," Drop files here or click to upload ",-1)),i("input",{type:"file",class:"sr-only",multiple:"",accept:"image/*,application/pdf,.doc,.docx,.txt",onChange:st},null,32)])]),e[52]||(e[52]=i("p",{class:"mt-2 text-xs text-gray-500"}," PNG, JPG, PDF, DOC, TXT up to 10MB each (max 10 files) ",-1))]),t(l).files&&t(l).files.length>0?(u(),m("div",xo,[(u(!0),m(Pe,null,He(t(l).files,(s,p)=>(u(),m("div",{key:p,class:"flex items-center justify-between p-3 bg-gray-50 rounded-lg border"},[i("div",To,[e[53]||(e[53]=i("svg",{class:"w-5 h-5 text-gray-400 mr-3",fill:"currentColor",viewBox:"0 0 20 20"},[i("path",{"fill-rule":"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z","clip-rule":"evenodd"})],-1)),i("div",null,[i("span",Vo,y(s.name||"Untitled File"),1),i("div",So,y(it(s.size||0))+" • Uploaded "+y(lt(s.uploadedAt)),1)])]),d(t(M),{variant:"ghost",size:"sm",onClick:R=>at(p),class:"text-red-600 hover:text-red-800"},{default:v(()=>e[54]||(e[54]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)])),_:2,__:[54]},1032,["onClick"])]))),128))])):x("",!0),i("div",Co,[i("details",null,[e[55]||(e[55]=i("summary",{class:"cursor-pointer hover:text-gray-700"},"Alternative Upload Method",-1)),i("div",Mo,[d(t($e),{modelValue:t(l).files,"onUpdate:modelValue":e[25]||(e[25]=s=>t(l).files=s),accept:"image/*,application/pdf,.doc,.docx,.txt",multiple:!0,"max-files":10,uploading:t(H),"upload-progress":t(ne),onFilesAdded:Je},null,8,["modelValue","uploading","upload-progress"])])])])])])):x("",!0),b.value==="options"?(u(),m("div",_o,[d(t(Tt),{modelValue:t(l).requiredSignature,"onUpdate:modelValue":e[26]||(e[26]=s=>t(l).requiredSignature=s),label:"Require signature for completion"},null,8,["modelValue"]),e[58]||(e[58]=i("div",{class:"bg-gray-50 p-4 rounded-lg"},[i("h4",{class:"text-sm font-medium text-gray-900 mb-2"},"Additional Options"),i("p",{class:"text-sm text-gray-600 mb-3"}," Configure special requirements and completion settings for this work order. "),i("ul",{class:"text-sm text-gray-600 space-y-1"},[i("li",null,[T("• "),i("strong",null,"Signature Required:"),T(" Technician must provide digital signature upon completion")]),i("li",null,"• More options will be available in future updates")])],-1)),i("div",Eo,[d(bt,{modelValue:t(l).costTracking,"onUpdate:modelValue":e[27]||(e[27]=s=>t(l).costTracking=s),parts:t(l).parts,"time-entries":t(l).timeEntries,disabled:t(_)},null,8,["modelValue","parts","time-entries","disabled"])]),i("div",Do,[d(wt,{modelValue:t(l).statusHistory,"onUpdate:modelValue":e[28]||(e[28]=s=>t(l).statusHistory=s),"current-status":t(l).status,"audit-entries":t(l).auditTrail,"user-options":t(E),"current-user":F.value,disabled:t(_),onStatusChange:et},null,8,["modelValue","current-status","audit-entries","user-options","current-user","disabled"])]),i("div",Uo,[d(xt,{"work-order":t(l),disabled:t(_),onReportGenerated:tt},null,8,["work-order","disabled"])])])):x("",!0)])]),_:1},8,["modelValue","title","size"])]),_:1}))}},ns=rt(Ho,[["__scopeId","data-v-76691d9d"]]);export{ns as default};