(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:a,output:s}){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:a})}),(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"}),s]})})]})]})}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])},39312,e=>{"use strict";let t=(0,e.i(75254).default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);e.s(["Zap",()=>t],39312)},72520,e=>{"use strict";let t=(0,e.i(75254).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",()=>t],72520)},67240,e=>{"use strict";let t=(0,e.i(75254).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",()=>t],67240)},40910,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(38149),s=e.i(95468),l=e.i(72520),i=e.i(67240),o=e.i(52008),n=e.i(39312),d=e.i(74837);let c={riverpod:{name:"Riverpod",desc:"The spiritual successor to Provider. Compile-safe, no BuildContext needed, and handles async effortlessly.",code:`// Riverpod Example
final counterProvider = StateProvider((ref) => 0);

class CounterWidget extends ConsumerWidget {
  @override
  Widget build(BuildContext context, WidgetRef ref) {
    final count = ref.watch(counterProvider);
    return ElevatedCard(
      child: Text('Count: $count'),
      onTap: () => ref.read(counterProvider.notifier).state++,
    );
  }
}`,color:"bg-blue-600"},bloc:{name:"BLoC / Cubit",desc:"The gold standard for enterprise. Strict separation of concerns using Streams.",code:`// Cubit Example
class CounterCubit extends Cubit<int> {
  CounterCubit() : super(0);
  void increment() => emit(state + 1);
}

// UI
BlocBuilder<CounterCubit, int>(
  builder: (context, state) => Text('Count: $state'),
)`,color:"bg-indigo-600"},getx:{name:"GetX",desc:"The high-productivity framework. State management, dependency injection, and route management in one.",code:`// GetX Example
class Controller extends GetxController {
  var count = 0.obs;
  increment() => count++;
}

// UI
final Controller c = Get.put(Controller());
Obx(() => Text('Count: \${c.count}'));`,color:"bg-purple-600"},provider:{name:"Provider",desc:"The classic choice. Wrapper around InheritedWidget that's easy to understand and widely supported.",code:`// Provider Example
class Counter with ChangeNotifier {
  int _count = 0;
  int get count => _count;
  void increment() {
    _count++;
    notifyListeners();
  }
}

// UI
Consumer<Counter>(
  builder: (context, counter, child) => Text('\${counter.count}'),
)`,color:"bg-blue-400"}};function u(){let[e,u]=(0,r.useState)(0),[m,x]=(0,r.useState)([]),[h,p]=(0,r.useState)(null),b=[{q:"How large is your project?",options:[{label:"Tiny / Prototype",val:"small"},{label:"Medium / Feature rich",val:"mid"},{label:"Large / Enterprise",val:"large"}]},{q:"How do you feel about boilerplate?",options:[{label:"Hate it, less code is better",val:"low"},{label:"I don't mind if it adds structure",val:"high"}]},{q:"Do you need powerful dependency injection?",options:[{label:"Yes, built-in please",val:"yes"},{label:"No, keeping it simple",val:"no"}]}];return(0,t.jsx)(a.ToolLayout,{title:"State Management Picker",description:"Tell us about your project, and we'll recommend the perfect state management solution with code.",controls:(0,t.jsx)("div",{className:"animate-in fade-in duration-700",children:h?(0,t.jsxs)("div",{className:"bg-card border border-border rounded-[3rem] p-12 shadow-2xl relative overflow-hidden h-full flex flex-col justify-center items-center text-center",children:[(0,t.jsx)(s.CheckCircle2,{className:"w-20 h-20 text-emerald-500 mb-6"}),(0,t.jsx)("h2",{className:"text-3xl font-black italic tracking-tight mb-2",children:"Quiz Complete!"}),(0,t.jsx)("p",{className:"text-muted-foreground mb-8",children:"We found the perfect state management solution for you based on your answers."}),(0,t.jsxs)("button",{onClick:()=>{u(0),x([]),p(null)},className:"flex items-center gap-2 px-6 py-3 bg-secondary rounded-full font-black text-[10px] uppercase tracking-widest hover:bg-border transition-all",children:[(0,t.jsx)(i.RotateCcw,{className:"w-3 h-3"})," Re-take Quiz"]})]}):(0,t.jsxs)("div",{className:"bg-card border border-border rounded-[3rem] p-12 shadow-2xl space-y-12 relative overflow-hidden h-full",children:[(0,t.jsx)("div",{className:"absolute top-0 right-0 w-64 h-64 bg-primary/5 blur-3xl rounded-full"}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex gap-2",children:b.map((r,a)=>(0,t.jsx)("div",{className:`h-1.5 w-12 rounded-full transition-all ${a<=e?"bg-primary":"bg-secondary"}`},a))}),(0,t.jsxs)("span",{className:"text-[10px] font-black text-muted-foreground uppercase tracking-widest",children:["Question ",e+1,"/3"]})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("h2",{className:"text-3xl font-black italic tracking-tight",children:b[e].q}),(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:"Select the option that best fits your development style."})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4",children:b[e].options.map(r=>(0,t.jsxs)("button",{onClick:()=>{let t;x(t=[...m,r.val]),e<b.length-1?u(e+1):"large"===t[0]||"high"===t[1]?p("bloc"):"yes"===t[2]&&"low"===t[1]?p("riverpod"):"small"===t[0]&&"low"===t[1]?p("getx"):p("provider")},className:"group flex items-center justify-between p-6 bg-secondary/30 border border-border rounded-2xl hover:bg-primary/5 hover:border-primary transition-all text-left",children:[(0,t.jsx)("span",{className:"font-bold",children:r.label}),(0,t.jsx)(l.ArrowRight,{className:"w-5 h-5 opacity-0 group-hover:opacity-100 -translate-x-4 group-hover:translate-x-0 transition-all text-primary"})]},r.val))})]})}),output:(0,t.jsx)("div",{className:"animate-in fade-in slide-in-from-right-4 duration-700 h-full",children:h?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"bg-card border border-border rounded-[3rem] p-10 shadow-xl relative overflow-hidden",children:[(0,t.jsx)("div",{className:`absolute top-0 right-0 w-80 h-80 ${c[h].color}/10 blur-[100px]`}),(0,t.jsxs)("div",{className:"flex items-center gap-6 mb-8",children:[(0,t.jsx)("div",{className:`w-16 h-16 rounded-3xl ${c[h].color} flex items-center justify-center text-white shadow-xl shadow-indigo-500/10`,children:(0,t.jsx)(n.Zap,{className:"w-8 h-8 fill-current"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[10px] font-black text-primary uppercase tracking-[0.3em] mb-1",children:"Recommendation"}),(0,t.jsx)("h2",{className:"text-3xl font-black italic",children:c[h].name})]})]}),(0,t.jsx)("p",{className:"text-md text-muted-foreground leading-relaxed mb-8",children:c[h].desc})]}),(0,t.jsx)(d.CodeOutput,{title:`${c[h].name} Boilerplate`,code:c[h].code,language:"dart"})]}):(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-center p-20 border-4 border-dashed border-border rounded-[4rem] opacity-20 bg-card/50",children:[(0,t.jsx)(o.Layers,{className:"w-20 h-20 mb-6"}),(0,t.jsx)("h4",{className:"text-2xl font-black italic",children:"Awaiting Answers"}),(0,t.jsx)("p",{className:"text-sm mt-2",children:"Complete the quiz on the left to see your recommendation."})]})})})}e.s(["default",()=>u])}]);