1import{bf as P,bg as R,bh as A,bi as y,bj as L,b9 as _,bc as o,bd as s,bq as q,b8 as f,bk as U,bl as $,be as d,bb as g,bm as a,ba as n,bp as x}from"./Cj73gxR1.js";import{_ as j}from"./CAl0mNgL.js";import{_ as Y}from"./MCL0uF5n.js";import{_ as z}from"./DjCRHOXZ.js";import{_ as G}from"./DnVLS1Se.js";import{u as J}from"./gSkbMpTx.js";import"./CKru41tl.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};l.SENTRY_RELEASE={id:"e614878d8cac39c91ec9cb376123f947256e1007"};var r=new l.Error().stack;r&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[r]="a5be1825-ffd7-4967-95d3-d1b17d6010c3",l._sentryDebugIdIdentifier="sentry-dbid-a5be1825-ffd7-4967-95d3-d1b17d6010c3")}catch{}})();const K={class:"text-2xl font-semibold leading-tight text-gray-800"},M={class:"py-12 px-4 sm:px-0"},O={class:"mx-auto max-w-8xl sm:px-6 lg:px-8 overflow-hidden"},Q={class:"grid grid-cols-3 gap-8"},W={class:"md:col-span-2"},X={key:0,class:"mb-4 text-green-500"},Z=["src"],re=P({__name:"[category]",async setup(l){let r,i;const v=R(),C=A(),{category:h}=C.params,{fetchFileCategory:w,updateFileCategory:T,deleteFileCategory:k,updateFileCategoryCover:V}=J(),t=y(([r,i]=L(()=>w(h)),r=await r,i(),r)),c=y(!1),D=async()=>{await T(t.value)},I=async()=>{await k(t.value),v.push("/internal/file-categories")},E=async b=>{const e=b.target.files[0],p=await V(t.value,e);t.value=p,c.value=!0,setTimeout(()=>{c.value=!1},5e3)};return(b,e)=>{const p=$,F=U,u=j,N=Y,B=z,H=G,S=q;return f(),_("div",null,[o(S,{name:"app-layout"},{header:s(()=>[n("h2",K,g(a(t)?.name),1),e[2]||(e[2]=n("p",{class:"text-sm"}," These categories correspond to folders that are included in a completed Home Sale Pack product. ",-1))]),default:s(()=>[o(F,null,{default:s(()=>[o(p,null,{default:s(()=>[d(g(a(t)?.name)+" | Home Sale Pack",1)]),_:1})]),_:1}),n("div",M,[n("div",O,[n("div",Q,[n("form",W,[o(u,{for:"name"},{default:s(()=>[...e[3]||(e[3]=[d("Title",-1)])]),_:1}),e[7]||(e[7]=n("p",{class:"text-xs"}," The system is reliant on these names and subsequently a category cannot be renamed. ",-1)),o(N,{modelValue:a(t).name,"onUpdate:modelValue":e[0]||(e[0]=m=>a(t).name=m),readonly:"",disabled:"",class:"mb-4 disabled:cursor-not-allowed opacity-40",type:"text"},null,8,["modelValue"]),o(u,{for:"description"},{default:s(()=>[...e[4]||(e[4]=[d("Description",-1)])]),_:1}),o(B,{modelValue:a(t).description,"onUpdate:modelValue":e[1]||(e[1]=m=>a(t).description=m),class:"mb-4 w-full h-20",placeholder:"An optional description of the purpose of this category.",onChange:D},null,8,["modelValue"]),o(u,{for:"cover"},{default:s(()=>[...e[5]||(e[5]=[d("Category Cover Page (PDF only)",-1)])]),_:1}),n("input",{type:"file",class:"mb-4",accept:"application/pdf",onInput:E},null,32),a(c)?(f(),_("div",X," Cover has been updated. ")):x("",!0),o(H,{type:"button",class:"!bg-brand-secondary !text-white block",onClick:I},{default:s(()=>[...e[6]||(e[6]=[d(" Delete Category ",-1)])]),_:1})]),n("div",null,[a(t).cover?(f(),_("embed",{key:0,src:a(t).cover,type:"application/pdf",width:"100%",height:"600px"},null,8,Z)):x("",!0)])])])])]),_:1})])}}});export{re as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.