module.exports=[69147,a=>{"use strict";var b=a.i(87924);function c({title:a,description:c,controls:d,output:e}){return(0,b.jsxs)("div",{className:"container mx-auto px-4 py-8 max-w-7xl",children:[(0,b.jsxs)("div",{className:"mb-8",children:[(0,b.jsx)("h1",{className:"text-3xl font-bold tracking-tight text-foreground mb-2",children:a}),(0,b.jsx)("p",{className:"text-muted-foreground",children:c})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 items-start",children:[(0,b.jsx)("div",{className:"space-y-6",children:(0,b.jsx)("div",{className:"bg-card rounded-2xl border border-border p-6 shadow-sm",children:d})}),(0,b.jsx)("div",{className:"lg:sticky lg:top-24",children:(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wider px-1",children:"Generated Output"}),e]})})]})]})}a.s(["ToolLayout",()=>c])},5151,a=>{"use strict";let b=(0,a.i(70106).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"}]]);a.s(["Copy",()=>b],5151)},33441,a=>{"use strict";let b=(0,a.i(70106).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);a.s(["Check",()=>b],33441)},84505,a=>{"use strict";let b=(0,a.i(70106).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);a.s(["Download",()=>b],84505)},92e3,a=>{"use strict";let b=(0,a.i(70106).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);a.s(["AlertCircle",()=>b],92e3)},70179,(a,b,c)=>{!function(b,c){if("function"==typeof define&&define.amd){let b;void 0!==(b=c())&&a.v(b)}else c()}(a.e,function(){"use strict";var c="object"==typeof self&&self.self===self?self:a.g.global===a.g?a.g:void 0,d=(c.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&/Safari/.test(navigator.userAgent),c.saveAs||function(){});c.saveAs=d.saveAs=d,b.exports=d})},48512,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(69147),e=a.i(62258),f=a.i(70106);let g=(0,f.default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);var h=a.i(53254),i=a.i(84505),j=a.i(8406),k=a.i(54933),l=a.i(1631),m=a.i(67453),n=a.i(92e3);let o=(0,f.default)("scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);var p=a.i(4416),q=a.i(70179);function r(){let[a,f]=(0,c.useState)(null),[r,s]=(0,c.useState)(!1),[t,u]=(0,c.useState)(""),[v,w]=(0,c.useState)([]),x=(0,c.useRef)(null);return(0,b.jsx)(d.ToolLayout,{title:"UI to Flutter AI Engine",description:"Advanced computer vision mock-up that transforms raw images into clean, responsive Flutter widget trees. Now with Sliver support and modern layout patterns.",controls:(0,b.jsxs)("div",{className:"space-y-6 h-full flex flex-col",children:[(0,b.jsxs)("div",{onClick:()=>x.current?.click(),className:`flex-1 border-2 border-dashed rounded-[3rem] flex flex-col items-center justify-center p-8 transition-all cursor-pointer group relative overflow-hidden ${a?"border-primary/50 bg-primary/5 shadow-2xl":"border-border hover:border-primary/40 hover:bg-secondary/30"}`,children:[(0,b.jsx)("input",{type:"file",ref:x,className:"hidden",accept:"image/*",onChange:a=>{let b=a.target.files?.[0];if(b){let a=new FileReader;a.onloadend=()=>{f(a.result),s(!0),u(""),w([]),setTimeout(()=>{w([{type:"Text",count:14,color:"text-blue-500"},{type:"Button",count:3,color:"text-green-500"},{type:"Container",count:6,color:"text-orange-500"},{type:"Image",count:2,color:"text-purple-500"}]),u(`import 'package:flutter/material.dart';

class GeneratedUIScreen extends StatelessWidget {
  const GeneratedUIScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: const Color(0xFF0F172A),
      body: CustomScrollView(
        slivers: [
          _buildAppBar(),
          SliverToBoxAdapter(
            child: Padding(
              padding: const EdgeInsets.all(24.0),
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  _buildSectionHeader('Explore Trends'),
                  const SizedBox(height: 20),
                  _buildHorizontalList(),
                  const SizedBox(height: 32),
                  _buildSectionHeader('Recommended for You'),
                  const SizedBox(height: 16),
                  _buildActionCard(),
                  const SizedBox(height: 16),
                  _buildStatGrid(),
                ],
              ),
            ),
          ),
        ],
      ),
      bottomNavigationBar: _buildBottomNav(),
    );
  }

  Widget _buildAppBar() {
    return SliverAppBar(
      expandedHeight: 120.0,
      floating: true,
      pinned: true,
      backgroundColor: const Color(0xFF1E293B),
      flexibleSpace: FlexibleSpaceBar(
        title: const Text('FlutterTools AI', 
          style: TextStyle(fontWeight: FontWeight.black, fontSize: 16)),
        background: Container(
          decoration: const BoxDecoration(
            gradient: LinearGradient(
              colors: [Color(0xFF6366F1), Color(0xFF8B5CF6)],
            ),
          ),
        ),
      ),
      actions: [
        IconButton(icon: const Icon(Icons.notifications_none), onPressed: () {}),
      ],
    );
  }

  Widget _buildSectionHeader(String title) {
    return Row(
      mainAxisAlignment: MainAxisAlignment.spaceBetween,
      children: [
        Text(title, style: const TextStyle(
          color: Colors.white, fontSize: 18, fontWeight: FontWeight.bold)),
        const Text('See All', style: TextStyle(color: Colors.indigoAccent, fontSize: 12)),
      ],
    );
  }

  Widget _buildHorizontalList() {
    return SizedBox(
      height: 160,
      child: ListView.builder(
        scrollDirection: Axis.horizontal,
        itemCount: 5,
        itemBuilder: (context, index) => Container(
          width: 140,
          margin: const EdgeInsets.only(right: 16),
          decoration: BoxDecoration(
            color: const Color(0xFF1E293B),
            borderRadius: BorderRadius.circular(24),
            border: Border.all(color: Colors.white10),
          ),
          child: const Center(child: Icon(Icons.auto_awesome, color: Colors.indigoAccent)),
        ),
      ),
    );
  }

  Widget _buildActionCard() {
    return Container(
      width: double.infinity,
      padding: const EdgeInsets.all(24),
      decoration: BoxDecoration(
        color: Colors.indigoAccent,
        borderRadius: BorderRadius.circular(32),
        boxShadow: [
          BoxShadow(color: Colors.indigoAccent.withOpacity(0.3), blurRadius: 20, offset: const Offset(0, 10))
        ],
      ),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          const Text('Smart UI Generation', 
            style: TextStyle(color: Colors.white, fontSize: 22, fontWeight: FontWeight.black)),
          const SizedBox(height: 8),
          const Text('Your image layout has been analyzed and mapped to Flutter widgets.',
            style: TextStyle(color: Colors.white70, fontSize: 14)),
          const SizedBox(height: 20),
          ElevatedButton(
            onPressed: () {},
            style: ElevatedButton.styleFrom(
              backgroundColor: Colors.white,
              foregroundColor: Colors.indigo,
              shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
            ),
            child: const Text('View Implementation'),
          ),
        ],
      ),
    );
  }

  Widget _buildStatGrid() {
    return GridView.count(
      shrinkWrap: true,
      physics: const NeverScrollableScrollPhysics(),
      crossAxisCount: 2,
      crossAxisSpacing: 16,
      mainAxisSpacing: 16,
      children: List.generate(2, (index) => Container(
        decoration: BoxDecoration(
          color: const Color(0xFF1E293B),
          borderRadius: BorderRadius.circular(24),
        ),
        child: const Center(child: Icon(Icons.analytics_outlined, color: Colors.white24)),
      )),
    );
  }

  Widget _buildBottomNav() {
    return BottomNavigationBar(
      backgroundColor: const Color(0xFF0F172A),
      unselectedItemColor: Colors.white24,
      selectedItemColor: Colors.indigoAccent,
      items: const [
        BottomNavigationBarItem(icon: Icon(Icons.home_filled), label: 'Home'),
        BottomNavigationBarItem(icon: Icon(Icons.search), label: 'Search'),
        BottomNavigationBarItem(icon: Icon(Icons.person), label: 'Profile'),
      ],
    );
  }
}`),s(!1)},3e3)},a.readAsDataURL(b)}}}),a?(0,b.jsxs)("div",{className:"relative w-full h-full animate-in zoom-in-95 duration-500",children:[(0,b.jsx)("img",{src:a,alt:"Uploaded UI",className:"w-full h-full object-contain rounded-2xl"}),r&&(0,b.jsx)("div",{className:"absolute inset-0 bg-primary/20 backdrop-blur-[2px]",children:(0,b.jsx)("div",{className:"absolute top-0 left-0 w-full h-1 bg-primary shadow-[0_0_15px_#6366f1] animate-scan"})}),(0,b.jsx)("div",{className:"absolute inset-0 bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center rounded-2xl backdrop-blur-sm",children:(0,b.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,b.jsx)(o,{className:"w-12 h-12 text-white animate-pulse"}),(0,b.jsx)("span",{className:"text-white font-bold text-xs tracking-widest uppercase",children:"Rescan Design"})]})})]}):(0,b.jsxs)("div",{className:"text-center space-y-4",children:[(0,b.jsx)("div",{className:"w-24 h-24 bg-primary/10 rounded-[2.5rem] flex items-center justify-center mx-auto group-hover:rotate-12 transition-transform duration-500",children:(0,b.jsx)(g,{className:"w-12 h-12 text-primary"})}),(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("p",{className:"font-black text-2xl tracking-tight",children:"Drop UI Screenshot"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground uppercase tracking-widest font-bold opacity-60",children:"Supported: PNG, JPG, FIGMA EXPORT"})]})]})]}),(0,b.jsxs)("div",{className:"p-6 bg-card border border-border rounded-[2.5rem] shadow-sm",children:[(0,b.jsxs)("h3",{className:"text-xs font-black text-muted-foreground uppercase tracking-widest mb-6 flex items-center gap-2",children:[(0,b.jsx)(j.Sparkles,{className:"w-4 h-4 text-primary"})," Visual Recognition Engine"]}),(0,b.jsx)("div",{className:"grid grid-cols-2 gap-4",children:v.length>0?v.map(a=>(0,b.jsxs)("div",{className:"flex flex-col p-4 bg-secondary/20 rounded-2xl border border-transparent hover:border-primary/20 transition-all",children:[(0,b.jsx)("span",{className:`text-[10px] font-black uppercase tracking-wider ${a.color}`,children:a.type}),(0,b.jsxs)("span",{className:"text-xl font-black mt-1",children:[a.count," NODES"]})]},a.type)):[1,2,3,4].map(a=>(0,b.jsx)("div",{className:"h-16 bg-secondary/20 rounded-2xl animate-pulse"},a))})]})]}),output:(0,b.jsxs)("div",{className:"h-full flex flex-col space-y-6",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between shrink-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("div",{className:`w-12 h-12 rounded-2xl flex items-center justify-center ${r?"bg-primary/20 animate-pulse border-2 border-primary/30":"bg-primary/10"}`,children:(0,b.jsx)(h.Code2,{className:"w-6 h-6 text-primary"})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{className:"text-2xl font-black tracking-tight",children:"Generated Widget Tree"}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(p.ShieldCheck,{className:"w-3.5 h-3.5 text-blue-500"}),(0,b.jsx)("span",{className:"text-[10px] text-muted-foreground font-black uppercase tracking-widest",children:"Analysis Confirmed: Stable"})]})]})]}),(0,b.jsx)("div",{className:"flex gap-2",children:t&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{onClick:()=>{let a=new Blob([t],{type:"text/plain;charset=utf-8"});(0,q.saveAs)(a,"generated_layout.dart")},className:"p-3 bg-secondary hover:bg-secondary/80 rounded-2xl transition-all",children:(0,b.jsx)(i.Download,{className:"w-5 h-5"})}),(0,b.jsx)("button",{onClick:()=>navigator.clipboard.writeText(t),className:"px-6 py-3 bg-primary text-white rounded-2xl font-black text-xs shadow-xl shadow-primary/20 hover:brightness-110 active:scale-95 transition-all",children:"COPY DART CODE"})]})})]}),(0,b.jsx)("div",{className:"flex-1 relative min-h-[500px] group overflow-hidden bg-slate-950 rounded-[3rem] border border-slate-900 border-border shadow-inner",children:r?(0,b.jsxs)("div",{className:"absolute inset-0 z-20 flex flex-col items-center justify-center bg-slate-950/80 backdrop-blur-xl",children:[(0,b.jsxs)("div",{className:"relative w-32 h-32 mb-8",children:[(0,b.jsx)("div",{className:"absolute inset-0 border-4 border-indigo-500/10 rounded-full"}),(0,b.jsx)("div",{className:"absolute inset-0 border-4 border-indigo-500 border-t-transparent rounded-full animate-spin"}),(0,b.jsx)(k.Wand2,{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-10 h-10 text-indigo-500 animate-pulse"})]}),(0,b.jsxs)("div",{className:"text-center space-y-2",children:[(0,b.jsx)("p",{className:"font-black text-2xl tracking-tighter text-white",children:"Synthesizing Widget Tree..."}),(0,b.jsx)("p",{className:"text-[10px] font-black text-indigo-400 uppercase tracking-[0.3em]",children:"Pixel Mapping in Progress"})]})]}):t?(0,b.jsx)("div",{className:"h-full animate-in fade-in slide-in-from-bottom-4 duration-700",children:(0,b.jsx)(e.CodeOutput,{code:t,language:"dart",title:"generated_layout.dart"})}):(0,b.jsxs)("div",{className:"h-full flex flex-col items-center justify-center p-12 text-center",children:[(0,b.jsx)(l.Smartphone,{className:"w-20 h-20 text-slate-800 mb-6 animate-bounce"}),(0,b.jsx)("h3",{className:"text-2xl font-black text-slate-700",children:"Ready for Analysis"}),(0,b.jsx)("p",{className:"text-xs text-slate-500 max-w-xs mt-4 leading-relaxed font-bold uppercase tracking-widest opacity-60",children:"Upload a UI screenshot to trigger the deep layout detection engine."})]})}),(0,b.jsx)("div",{className:"grid grid-cols-3 gap-4",children:[{label:"CLEAN CODE",icon:m.CheckCircle2,color:"text-green-500"},{label:"NULL SAFE",icon:p.ShieldCheck,color:"text-blue-500"},{label:"RESPONSIVE",icon:n.AlertCircle,color:"text-orange-500"}].map(a=>(0,b.jsxs)("div",{className:"flex items-center justify-center gap-3 p-4 bg-white/5 border border-white/5 rounded-2xl",children:[(0,b.jsx)(a.icon,{className:`w-4 h-4 ${a.color}`}),(0,b.jsx)("span",{className:"text-[10px] font-black uppercase tracking-widest opacity-70",children:a.label})]},a.label))})]})})}a.s(["default",()=>r],48512)}];

//# sourceMappingURL=_5b988bbc._.js.map