1import{r as s,j as t}from"./framer-motion-BaLjy9Ko.js";import{v as h,B as d,t as u,m as w}from"./index-BkdpRCRP.js";import{B as j}from"./BrandKitDisplay-TYe0c63F.js";import{a4 as v}from"./lucide-fSneZNun.js";import"./radix-ui-BFkc169U.js";import"./pdf-B-X7H1-U.js";import"./charts-C5feAMdf.js";import"./badge-DwsXdHt1.js";import"./separator-DRFG29Zw.js";import"./input-c7ikxovD.js";import"./textarea-DmN_6ihT.js";import"./MockupPreview-0kf1qbH1.js";import"./ColorApplicationPreview-C21DaWNH.js";function L({kitId:r,onNavigate:o,userTier:m}){const[i,n]=s.useState(null),[f,p]=s.useState(!0),[c,x]=s.useState(null);return s.useEffect(()=>{r&&(async()=>{try{const e=await w(`/api/brand-kits/${r}/detail`);if(!e.ok)throw e.status===404?new Error("Brand Kit not found"):e.status===401?new Error("Unauthorized access"):new Error("Failed to load Brand Kit");const a=await e.json();n({...a,id:a._id||a.id})}catch(e){console.error(e),x(e instanceof Error?e.message:"Unknown error")}finally{p(!1)}})()},[r]),f?t.jsx(h,{message:"Retrieving Brand Assets..."}):c?t.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[50vh] space-y-4",children:[t.jsx("div",{className:"text-red-500 text-xl font-bold",children:"ACCESS DENIED"}),t.jsx("p",{className:"text-[#cfcfcf]",children:c}),t.jsx(d,{onClick:()=>o("dashboard"),variant:"outline",className:"border-[#d4af37]",children:"Return to Dashboard"})]}):i?t.jsxs("div",{className:"max-w-7xl mx-auto p-4 md:p-8 space-y-6",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsxs(d,{onClick:()=>o("vault"),variant:"ghost",className:"text-[#cfcfcf] hover:text-[#d4af37]",children:[t.jsx(v,{className:"w-4 h-4 mr-2"}),"Back to Vault"]}),t.jsx("h1",{className:"text-sm font-mono text-[#d4af37]/50 uppercase tracking-widest",children:"Shared Access View"})]}),t.jsx(j,{kit:i,userPlan:m,onKitUpdated:l=>{n(l),u.success("Changes saved to shared view")}})]}):null}export{L as SharedKitView};
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.