(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,38149,e=>{"use strict";var r=e.i(43476);function t({title:e,description:t,controls:s,output:i}){return(0,r.jsxs)("div",{className:"container mx-auto px-4 py-8 max-w-7xl",children:[(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsx)("h1",{className:"text-3xl font-bold tracking-tight text-foreground mb-2",children:e}),(0,r.jsx)("p",{className:"text-muted-foreground",children:t})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 items-start",children:[(0,r.jsx)("div",{className:"space-y-6",children:(0,r.jsx)("div",{className:"bg-card rounded-2xl border border-border p-6 shadow-sm",children:s})}),(0,r.jsx)("div",{className:"lg:sticky lg:top-24",children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("h2",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wider px-1",children:"Generated Output"}),i]})})]})]})}e.s(["ToolLayout",()=>t])},74886,e=>{"use strict";let r=(0,e.i(75254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>r],74886)},43531,e=>{"use strict";let r=(0,e.i(75254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",()=>r],43531)},31067,e=>{"use strict";function r(){return(r=Object.assign.bind()).apply(null,arguments)}e.s(["default",()=>r])},83748,e=>{"use strict";var r=e.i(43476),t=e.i(71645),s=e.i(38149),i=e.i(74837);function d(){let[e,d]=(0,t.useState)({id:"root",type:"Column",children:[{id:"1",type:"Text",children:[]},{id:"2",type:"Icon",children:[]}]}),l=e=>{let r=e.children.map(e=>l(e)).join(",\n    ");switch(e.type){case"Column":return`Column(
  children: [
    ${r}
  ],
)`;case"Row":return`Row(
  children: [
    ${r}
  ],
)`;case"Container":return`Container(
  child: ${e.children[0]?l(e.children[0]):"SizedBox()"},
)`;case"Text":return'Text("Hello World")';case"Icon":return"Icon(Icons.star)";default:return""}},n=t=>(0,r.jsxs)("div",{className:"p-4 border-2 border-primary/20 rounded-xl bg-primary/5 m-2 relative",children:[(0,r.jsx)("div",{className:"text-[10px] font-bold text-primary mb-2 uppercase",children:t.type}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:t.children.map(e=>n(e))}),(0,r.jsx)("div",{className:"mt-4 flex gap-2 overflow-x-auto pb-2",children:["Text","Icon","Container","Column","Row"].map(s=>(0,r.jsxs)("button",{onClick:()=>{var r;let i,l;return r=t.id,i={...e},void((l=e=>{if(e.id===r)return e.children.push({id:Math.random().toString(),type:s,children:[]}),!0;for(let r of e.children)if(l(r))return!0;return!1})(i),d(i))},className:"px-2 py-1 bg-primary text-white text-[10px] rounded hover:brightness-110 shrink-0",children:["+ ",s]},s))})]},t.id);return(0,r.jsx)(s.ToolLayout,{title:"Visual Layout Builder",description:"Build complex Flutter UIs visually by adding and nesting blocks. Export clean Dart code instantly.",controls:(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"p-4 bg-secondary/30 rounded-2xl border border-border min-h-[400px]",children:[(0,r.jsx)("span",{className:"text-xs font-bold text-muted-foreground uppercase tracking-widest block mb-4",children:"Canvas"}),n(e)]}),(0,r.jsx)("button",{onClick:()=>d({id:"root",type:"Column",children:[]}),className:"w-full py-2 border border-red-500/30 text-red-500 text-xs rounded-xl hover:bg-red-500/10 transition-colors",children:"RESET CANVAS"})]}),output:(0,r.jsx)(i.CodeOutput,{code:l(e)})})}e.s(["default",()=>d])}]);