1import{r as d,j as e,L as o}from"./vendor-ClmKSrgg.js";import{u as c}from"./mockAnalyses-NyLSkbi-.js";import{t as m}from"./index-CrYazRgx.js";import{u as x,C as p,a as u}from"./CabinetChrome-CYwvoFsQ.js";import{S as h,u as g}from"./StudioProvider-CIEq12L_.js";import{C as f}from"./CoinIcon-B0ioxj0x.js";import"./supabase-CHGq0V2O.js";import"./PageShell-OZWuqMxT.js";import"./cart-DJAgS9nH.js";import"./checkoutDrawer-aFxZ8DDQ.js";import"./Footer-5GVkG_tC.js";import"./useTranslation-Dc9YMjql.js";import"./createLucideIcon-CyJVjoCj.js";import"./GuideLink-9LkPzcXz.js";import"./shopping-cart-B0D7DZGi.js";import"./index.esm-DXVQE90n.js";import"./realAnalyses-BIjr9-_M.js";import"./studioConfig-DMPFPyQZ.js";import"./artmdConfig-ETVe0BvH.js";function Y(){const{user:i,loading:s}=c(),{analyses:t,anonAnalyses:a}=x(),r=d.useRef(!1);return d.useEffect(()=>{s||r.current||!i||(r.current=!0,m("dashboard_viewed",{variant:"whoop",view:"studio",signed_in:!0,analyses_count:t.length}))},[s,i,t.length]),s?null:i?e.jsxs(u,{active:"studio",children:[e.jsxs("div",{className:"mb-5",children:[e.jsx("div",{className:"font-plex text-[9px] tracking-[0.18em] uppercase text-rmd-ink-dim",children:"Collection"}),e.jsx("div",{className:"font-inter text-[20px] font-semibold tracking-[-0.02em] mt-0.5 text-rmd-ink",children:"Studio"})]}),e.jsx("div",{className:"flex flex-col gap-3.5",children:e.jsx(h,{children:e.jsx(b,{})})})]}):e.jsx(p,{nextPath:"/dashboard/studio",anonCount:a.length})}function b(){const{ready:i,balance:s,pieces:t,uploads:a}=g(),r=t.filter(n=>n.status==="done"&&n.imageUrl),l=t.length-r.length;return e.jsxs("div",{className:"rounded-2xl border border-rmd-line bg-rmd-panel p-[18px]",style:{backgroundImage:"radial-gradient(120% 100% at 50% 0%, rgba(201,184,145,0.07), transparent 55%)"},children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 mb-3",children:[e.jsxs("div",{className:"font-plex text-[9px] tracking-[0.16em] uppercase text-[#e6d9bd]",children:["Studio artwork",t.length?` · ${t.length} piece${t.length===1?"":"s"}`:""]}),e.jsxs("span",{className:"inline-flex items-center gap-1 font-plex text-[11px] text-rmd-ink tabular-nums",title:"Studio credits",children:[i?s:"â¦"," ",e.jsx(f,{size:14})]})]}),r.length>0?e.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-6 gap-2 mb-3.5",children:r.slice(0,6).map(n=>e.jsx(o,{to:"/studio/create",className:"block",children:e.jsx("img",{src:n.imageUrl,alt:"",loading:"lazy",className:"w-full aspect-[2/3] object-cover rounded-lg border border-rmd-line hover:border-[#c9b891]/60 transition-colors"})},n.id))}):e.jsx("p",{className:"font-inter text-[13px] text-rmd-ink-mute leading-relaxed mb-3.5",children:a.length?"Your photos are in â pick a theme and make your first piece.":"Nothing hanging yet. Upload a photo, pick a theme, and your piece is ready in about a minute."}),l>0&&e.jsxs("p",{className:"font-plex text-[10px] text-rmd-blue-bright mb-3",children:[l," renderingâ¦"]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(o,{to:"/studio/create",className:"inline-flex items-center justify-center font-plex text-[11px] px-5 py-2.5 border border-[#c9b891]/50 text-[#e6d9bd] rounded-lg no-underline hover:border-[#ece0c4] transition-colors",children:t.length?"OPEN THE STUDIO â":"MAKE YOUR FIRST PIECE â"}),e.jsx(o,{to:"/studio",className:"font-plex text-[10.5px] text-rmd-ink-mute no-underline hover:text-rmd-ink transition-colors",children:"Browse the styles â"})]})]})}export{Y 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.