import{$ as e,Ct as t,Et as n,Kt as r,L as i,M as a,Nt as o,Pt as s,R as c,Tt as l,X as u,pt as d,st as f}from"../chunks/xY0c-UfG.js";import"../chunks/xihTtKlq.js";import{n as p}from"../chunks/C9QtJpOb.js";import{t as m}from"../chunks/ByTixK1i.js";import{n as h}from"../chunks/BvYk3gM92.js";import{a as g}from"../chunks/DiMsLIh32.js";import{t as _}from"../chunks/DayPzYFE2.js";var v=r({load:()=>y});function y({params:e}){return{entityType:e.type}}function b(r,v){s(v,!0);let y=()=>n(p,`$page`,b),[b,x]=l(),S=t(()=>v.data.entityType),C=t(()=>u(S)===`recent`),w=t(()=>u(C)&&y().url.searchParams.get(`view`)===`my-tasks`?{version:1,enum:{entity_type:[`task`],assignee:[h]}}:null);f(()=>{m.showView(-1)}),f(()=>{e(()=>m.deselect())});var T=c();a(d(T),()=>`${u(S)}${u(w)?`:my-tasks`:``}`,e=>{{let n=t(()=>u(C)?`Recent`:g(u(S))),r=t(()=>`type-${u(S)}`),i=t(()=>u(C)?null:u(S)),a=t(()=>u(w)?`date`:u(C)?`updated_at`:`name`),o=t(()=>u(w)?!0:!u(C)),s=t(()=>u(C)?`updated_at`:`date`);_(e,{get name(){return u(n)},get storageId(){return u(r)},get lockedType(){return u(i)},get defaultSortKey(){return u(a)},get defaultSortAsc(){return u(o)},get alwaysDefaultSort(){return u(C)},get defaultCalendarDateField(){return u(s)},get initialFilterOverride(){return u(w)}})}}),i(r,T),o(),x()}export{b as component,v as universal};