(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,38149,e=>{"use strict";var t=e.i(43476);function r({title:e,description:r,controls:s,output:o}){return(0,t.jsxs)("div",{className:"container mx-auto px-4 py-8 max-w-7xl",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("h1",{className:"text-3xl font-bold tracking-tight text-foreground mb-2",children:e}),(0,t.jsx)("p",{className:"text-muted-foreground",children:r})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 items-start",children:[(0,t.jsx)("div",{className:"space-y-6",children:(0,t.jsx)("div",{className:"bg-card rounded-2xl border border-border p-6 shadow-sm",children:s})}),(0,t.jsx)("div",{className:"lg:sticky lg:top-24",children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wider px-1",children:"Generated Output"}),o]})})]})]})}e.s(["ToolLayout",()=>r])},74886,e=>{"use strict";let t=(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",()=>t],74886)},43531,e=>{"use strict";let t=(0,e.i(75254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",()=>t],43531)},31067,e=>{"use strict";function t(){return(t=Object.assign.bind()).apply(null,arguments)}e.s(["default",()=>t])},44367,e=>{"use strict";var t=e.i(43476),r=e.i(71645),s=e.i(38149),o=e.i(74837);function a(){let[e,a]=(0,r.useState)(`{
  "name": "Primary Button",
  "type": "RECTANGLE",
  "fills": [{ "type": "SOLID", "color": { "r": 0.0078, "g": 0.5176, "b": 0.7803 } }],
  "cornerRadius": 12,
  "absoluteBoundingBox": { "width": 200, "height": 50 }
}`);return(0,t.jsx)(s.ToolLayout,{title:"Figma to Flutter UI",description:"Paste exported Figma Node JSON (from plugins like 'Figma to JSON') and get immediate Flutter widget code.",controls:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-muted-foreground",children:"Figma Node JSON"}),(0,t.jsx)("textarea",{value:e,onChange:e=>a(e.target.value),className:"w-full h-80 px-4 py-3 bg-slate-900 border border-border rounded-xl font-mono text-xs text-purple-400 focus:ring-2 focus:ring-primary outline-none transition-all resize-none",placeholder:"Paste Figma Node JSON here..."})]}),(0,t.jsx)("div",{className:"p-4 bg-purple-500/5 border border-purple-500/20 rounded-xl",children:(0,t.jsxs)("p",{className:"text-[10px] text-muted-foreground leading-relaxed",children:[(0,t.jsx)("strong",{className:"text-purple-500",children:"How to use:"})," Use a Figma plugin like 'Figma to JSON' to export raw node data, then paste it here. We'll extract colors, radii, and dimensions."]})})]}),output:(0,t.jsx)(o.CodeOutput,{code:(e=>{try{let t=JSON.parse(e),r=t.fills?.[0]?.color?`Color(0xFF${Math.round(255*t.fills[0].color.r).toString(16).padStart(2,"0")}${Math.round(255*t.fills[0].color.g).toString(16).padStart(2,"0")}${Math.round(255*t.fills[0].color.b).toString(16).padStart(2,"0")})`:"Colors.blue";return`Container(
  width: ${t.absoluteBoundingBox?.width??100},
  height: ${t.absoluteBoundingBox?.height??100},
  decoration: BoxDecoration(
    color: const ${r},
    borderRadius: BorderRadius.circular(${t.cornerRadius??0}),
  ),
  child: const Center(
    child: Text("${t.name??"Widget"}"),
  ),
)`}catch(e){return`// Error parsing Figma JSON: ${e.message}`}})(e)})})}e.s(["default",()=>a])}]);