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)},87532,a=>{"use strict";let b=(0,a.i(70106).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);a.s(["Search",()=>b],87532)},44494,a=>{"use strict";let b=(0,a.i(70106).default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);a.s(["Globe",()=>b],44494)},92759,a=>{"use strict";let b=(0,a.i(70106).default)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);a.s(["Send",()=>b],92759)},1087,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(69147),e=a.i(87532),f=a.i(5151),g=a.i(44494),h=a.i(63588),i=a.i(92759),j=a.i(52181),k=a.i(82098);let l=(0,a.i(70106).default)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]),m=[{title:"Basic GET Request (Dio)",category:"networking",icon:g.Globe,code:`final dio = Dio();
final response = await dio.get('https://api.example.com/data');
if (response.statusCode == 200) {
  print(response.data);
}`},{title:"Custom Alert Dialog",category:"dialogs",icon:h.MessageSquare,code:`showDialog(
  context: context,
  builder: (context) => AlertDialog(
    title: Text('Confirm Action'),
    content: Text('Are you sure you want to proceed?'),
    actions: [
      TextButton(onPressed: () => Navigator.pop(context), child: Text('CANCEL')),
      ElevatedButton(onPressed: () {}, child: Text('CONFIRM')),
    ],
  ),
);`},{title:"Named Route Navigation",category:"navigation",icon:i.Send,code:`Navigator.pushNamed(
  context,
  '/details',
  arguments: {'id': 123},
);`},{title:"Form Validation",category:"forms",icon:j.Layout,code:`TextFormField(
  validator: (value) {
    if (value == null || value.isEmpty) {
      return 'Please enter some text';
    }
    return null;
  },
)`},{title:"Hero Transition",category:"animations",icon:k.Braces,code:`Hero(
  tag: 'product-1',
  child: Image.network('https://...'),
)`}];function n(){let[a,g]=(0,c.useState)(""),[h,i]=(0,c.useState)("all"),[j,k]=(0,c.useState)(m[0]),n=m.filter(b=>("all"===h||b.category===h)&&(b.title.toLowerCase().includes(a.toLowerCase())||b.code.toLowerCase().includes(a.toLowerCase())));return(0,b.jsx)(d.ToolLayout,{title:"Flutter Code Snippets",description:"Battle-tested code snippets for everyday Flutter tasks. Save time by using these ready-to-use boilerplate patterns.",controls:(0,b.jsxs)("div",{className:"space-y-6 h-full flex flex-col",children:[(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(e.Search,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),(0,b.jsx)("input",{type:"text",value:a,onChange:a=>g(a.target.value),placeholder:"Search snippets...",className:"w-full pl-11 pr-4 py-3 bg-secondary/30 border border-border rounded-2xl outline-none focus:ring-2 focus:ring-primary transition-all font-medium"})]}),(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:["all","networking","dialogs","navigation","forms","animations"].map(a=>(0,b.jsx)("button",{onClick:()=>i(a),className:`px-3 py-1.5 rounded-xl text-[10px] font-bold uppercase tracking-wider transition-all ${h===a?"bg-primary text-white":"bg-card border border-border text-muted-foreground hover:border-primary/50"}`,children:a},a))}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 pr-2 custom-scrollbar",children:n.map(a=>(0,b.jsx)("button",{onClick:()=>k(a),className:`w-full p-4 rounded-2xl border text-left transition-all group ${j.title===a.title?"bg-primary/5 border-primary shadow-sm":"bg-card border-border hover:border-primary/50"}`,children:(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("div",{className:`p-2 rounded-lg ${j.title===a.title?"bg-primary text-white":"bg-secondary text-muted-foreground group-hover:bg-primary/20 group-hover:text-primary"}`,children:(0,b.jsx)(a.icon,{className:"w-4 h-4"})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h4",{className:"font-bold text-sm tracking-tight",children:a.title}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5 mt-1",children:[(0,b.jsx)(l,{className:"w-3 h-3 text-muted-foreground"}),(0,b.jsx)("span",{className:"text-[10px] text-muted-foreground font-bold uppercase",children:a.category})]})]})]})},a.title))})]}),output:(0,b.jsxs)("div",{className:"space-y-6 animate-in fade-in slide-in-from-bottom-4 duration-500",children:[(0,b.jsxs)("div",{className:"p-8 bg-card border border-border rounded-[2.5rem] shadow-xl relative overflow-hidden",children:[(0,b.jsx)("div",{className:"relative z-10",children:(0,b.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,b.jsx)("div",{className:"p-2.5 bg-primary/10 rounded-xl",children:(0,b.jsx)(j.icon,{className:"w-6 h-6 text-primary"})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{className:"text-2xl font-black",children:j.title}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Standard implementation for ",(0,b.jsx)("b",{children:j.category}),"."]})]})]})}),(0,b.jsx)("div",{className:"absolute top-0 right-0 p-8 opacity-5",children:(0,b.jsx)(j.icon,{className:"w-32 h-32"})})]}),(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-2",children:[(0,b.jsx)("h3",{className:"text-xs font-bold uppercase tracking-widest text-muted-foreground",children:"Flutter Code"}),(0,b.jsxs)("button",{onClick:()=>navigator.clipboard.writeText(j.code),className:"flex items-center gap-2 text-xs font-bold text-primary hover:underline transition-all",children:[(0,b.jsx)(f.Copy,{className:"w-3.5 h-3.5"}),"COPY SNIPPET"]})]}),(0,b.jsxs)("div",{className:"relative group",children:[(0,b.jsx)("pre",{className:"p-8 bg-[#0d0d0d] border border-border rounded-[2rem] text-sm font-mono text-purple-300 overflow-x-auto leading-relaxed custom-scrollbar shadow-inner",children:j.code}),(0,b.jsx)("div",{className:"absolute top-4 right-4 animate-pulse opacity-0 group-hover:opacity-100 transition-opacity",children:(0,b.jsx)("div",{className:"px-2 py-1 bg-primary/20 border border-primary/30 rounded text-[10px] font-bold text-primary",children:"DART"})})]})]}),(0,b.jsx)("div",{className:"p-6 bg-secondary/20 rounded-3xl border border-dashed border-border text-center",children:(0,b.jsx)("p",{className:"text-xs text-muted-foreground italic",children:"“These snippets are regularly updated and checked for compatibility with Flutter 3.x”"})})]})})}a.s(["default",()=>n],1087)}];

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