(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,38149,e=>{"use strict";var t=e.i(43476);function s({title:e,description:s,controls:a,output:r}){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:s})]}),(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"}),r]})})]})]})}e.s(["ToolLayout",()=>s])},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])},41929,e=>{"use strict";let t=(0,e.i(75254).default)("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]);e.s(["FileCode",()=>t],41929)},68054,e=>{"use strict";let t=(0,e.i(75254).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],68054)},54523,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(38149),r=e.i(56272),i=e.i(41929);let d=(0,e.i(75254).default)("beaker",[["path",{d:"M4.5 3h15",key:"c7n0jr"}],["path",{d:"M6 3v16a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V3",key:"m1uhx7"}],["path",{d:"M6 14h12",key:"4cwo0f"}]]);var l=e.i(68054),o=e.i(74837);function n(){let[e,n]=(0,s.useState)(""),[c,u]=(0,s.useState)("");return(0,t.jsx)(a.ToolLayout,{title:"Flutter Test Generator",description:"Instant test boilerplate for your widgets and classes. Support for unit and widget tests.",controls:(0,t.jsxs)("div",{className:"space-y-6 animate-in fade-in duration-700",children:[(0,t.jsxs)("div",{className:"bg-card border border-border rounded-[3rem] p-10 shadow-2xl space-y-8 relative overflow-hidden",children:[(0,t.jsx)("div",{className:"absolute top-0 right-0 w-32 h-32 bg-primary/5 blur-3xl rotate-45"}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("div",{className:"w-12 h-12 bg-primary/10 rounded-2xl flex items-center justify-center text-primary",children:(0,t.jsx)(i.FileCode,{className:"w-6 h-6"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-xl font-black",children:"Input Source"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground font-bold uppercase tracking-widest",children:"Supports Classes & Widgets"})]})]}),(0,t.jsx)("textarea",{value:e,onChange:e=>n(e.target.value),placeholder:"class UserProfile extends StatelessWidget { ...",className:"w-full h-[400px] bg-secondary/30 border border-border rounded-2xl p-6 font-mono text-xs outline-none focus:border-primary transition-all resize-none custom-scrollbar"}),(0,t.jsxs)("button",{onClick:()=>{if(!e)return;let t=e.match(/class\s+(\w+)/),s=t?t[1]:"MyWidget",a=e.includes("extends StatelessWidget")||e.includes("extends StatefulWidget"),r=`import 'package:flutter_test/flutter_test.dart';
`;r+=`import 'package:my_app/${s.toLowerCase()}.dart';

`,a?r+=`void main() {
  group('${s} Widget Tests', () => {
    testWidgets('should render correctly', (WidgetTester tester) async {
      await tester.pumpWidget(MaterialApp(home: ${s}()));
      expect(find.byType(${s}), findsOneWidget);
    });

    testWidgets('should handle interaction', (WidgetTester tester) async {
      await tester.pumpWidget(MaterialApp(home: ${s}()));
      // TODO: Add interaction tests
    });
  });
}
`:r+=`void main() {
  group('${s} Unit Tests', () => {
    late ${s} sut;

    setUp(() {
      sut = ${s}();
    });

    test('initial state should be valid', () {
      // expect(sut.value, initialValue);
    });

    tearDown(() {
      // clean up
    });
  });
}
`,u(r)},className:"group w-full h-14 bg-primary text-white font-black rounded-2xl flex items-center justify-center gap-3 shadow-xl shadow-primary/30 hover:brightness-110 active:scale-95 transition-all overflow-hidden",children:[(0,t.jsx)(d,{className:"w-5 h-5 group-hover:rotate-12 transition-transform"}),"GENERATE TEST SUITE"]})]}),(0,t.jsxs)("div",{className:"bg-secondary/20 rounded-[2rem] p-6 border border-border flex items-start gap-4",children:[(0,t.jsx)(l.Terminal,{className:"w-5 h-5 text-muted-foreground mt-1"}),(0,t.jsx)("p",{className:"text-[10px] uppercase font-black tracking-widest text-muted-foreground leading-relaxed",children:"Pro Tip: Copy-paste the generated code into your `/test` directory. Remember to add mocks if your dependencies require them."})]})]}),output:(0,t.jsx)("div",{className:"space-y-6 animate-in fade-in slide-in-from-right-4 duration-700",children:c?(0,t.jsx)(o.CodeOutput,{title:"Generated Test Suite",code:c,language:"dart"}):(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-center py-20 px-8 border-4 border-dashed border-border rounded-[4rem] opacity-20 bg-card/50",children:[(0,t.jsx)(r.CheckSquare,{className:"w-20 h-20 mb-6"}),(0,t.jsx)("h4",{className:"text-2xl font-black italic",children:"Awaiting Payload"}),(0,t.jsx)("p",{className:"text-sm mt-2",children:"The generator expects a Dart class or widget on the left."})]})})})}e.s(["default",()=>n],54523)}]);