1import{r as l,j as e,au as B,J as c,_ as o,$ as u,ak as d,K as m,L as h,s as E,af as y}from"./index-DGmFoSsk.js";const L=()=>{const[j,f]=l.useState([]),[x,v]=l.useState([]),[p,N]=l.useState([]),[w,z]=l.useState(!0),[b,k]=l.useState(!0),[P,S]=l.useState(!0),n=async s=>{const a=s==="journey"?f:s==="puzzle"?v:N,C=s==="journey"?z:s==="puzzle"?k:S;try{const t=[];for(let i=1;i<=3;i++){const{data:r,error:g}=await E.functions.invoke("generate-asset-visuals",{body:{style:s,assetNumber:i}});if(g)throw g;r!=null&&r.imageUrl&&t.push(r.imageUrl)}a(t),y.success(`Generated ${s} preview!`)}catch(t){console.error("Error generating preview:",t),y.error(`Failed to generate ${s} preview`)}finally{C(!1)}};return l.useEffect(()=>{n("journey"),n("puzzle"),n("blocks")},[]),e.jsxs(B,{maxWidth:"7xl",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold mb-2",children:"Asset Visual Style Preview"}),e.jsx("p",{className:"text-muted-foreground",children:"Preview how your 14 White Belt assets will look in different visual styles. Choose the one that resonates with your vision."})]}),e.jsxs(c,{children:[e.jsxs(o,{children:[e.jsx(u,{children:"ð¤ï¸ Journey/Path Style"}),e.jsx(d,{children:"Assets displayed as waypoints along a spiritual learning journey. Each asset is a milestone marker on the path to mastery."})]}),e.jsx(m,{className:"space-y-4",children:w?e.jsxs("div",{className:"flex items-center justify-center py-8",children:[e.jsx(h,{className:"h-8 w-8 animate-spin text-primary"}),e.jsx("span",{className:"ml-2",children:"Generating journey preview..."})]}):j.length>0?e.jsx("div",{className:"grid grid-cols-3 gap-4",children:j.map((s,a)=>e.jsxs("div",{className:"relative aspect-square",children:[e.jsx("img",{src:s,alt:`Journey Asset ${a+1}`,className:"rounded-lg w-full h-full object-cover"}),e.jsx("div",{className:"absolute top-2 left-2 text-2xl",children:["ð³","ð","ð«"][a]})]},a))}):null})]}),e.jsxs(c,{children:[e.jsxs(o,{children:[e.jsx(u,{children:"ð§© Puzzle Pieces Style"}),e.jsx(d,{children:"Each asset is a puzzle piece that connects to form a complete picture of your learning journey. Collect all 14 to see the whole."})]}),e.jsx(m,{className:"space-y-4",children:b?e.jsxs("div",{className:"flex items-center justify-center py-8",children:[e.jsx(h,{className:"h-8 w-8 animate-spin text-primary"}),e.jsx("span",{className:"ml-2",children:"Generating puzzle preview..."})]}):x.length>0?e.jsx("div",{className:"grid grid-cols-3 gap-4",children:x.map((s,a)=>e.jsxs("div",{className:"relative aspect-square",children:[e.jsx("img",{src:s,alt:`Puzzle Asset ${a+1}`,className:"rounded-lg w-full h-full object-cover"}),e.jsx("div",{className:"absolute top-2 left-2 text-2xl",children:["ð³","ð","ð«"][a]})]},a))}):null})]}),e.jsxs(c,{children:[e.jsxs(o,{children:[e.jsx(u,{children:"ð§± Building Blocks Style"}),e.jsx(d,{children:"Stack your assets like building blocks to construct your foundation of knowledge. Each block strengthens the structure."})]}),e.jsx(m,{className:"space-y-4",children:P?e.jsxs("div",{className:"flex items-center justify-center py-8",children:[e.jsx(h,{className:"h-8 w-8 animate-spin text-primary"}),e.jsx("span",{className:"ml-2",children:"Generating blocks preview..."})]}):p.length>0?e.jsx("div",{className:"grid grid-cols-3 gap-4",children:p.map((s,a)=>e.jsxs("div",{className:"relative aspect-square",children:[e.jsx("img",{src:s,alt:`Block Asset ${a+1}`,className:"rounded-lg w-full h-full object-cover"}),e.jsx("div",{className:"absolute top-2 left-2 text-2xl",children:["ð³","ð","ð«"][a]})]},a))}):null})]})]})};export{L 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.