import { jsx as _jsx } from "react/jsx-runtime";
import { DiffView } from './diff-view.js';
const sampleFiles = [
    {
        path: 'src/components/auth/login-form.tsx',
        additions: 45,
        deletions: 12,
        status: 'modified',
        hunks: [
            {
                header: '@@ -1,8 +1,12 @@',
                lines: [
                    {
                        type: 'context',
                        content: "import { useState } from 'react';",
                        oldNumber: 1,
                        newNumber: 1,
                    },
                    {
                        type: 'context',
                        content: "import { Button } from '../../ui/button.js';",
                        oldNumber: 2,
                        newNumber: 2,
                    },
                    {
                        type: 'added',
                        content: "import { Input } from '../../ui/input.js';",
                        newNumber: 3,
                    },
                    {
                        type: 'added',
                        content: "import { Label } from '../../ui/label.js';",
                        newNumber: 4,
                    },
                    { type: 'context', content: '', oldNumber: 3, newNumber: 5 },
                    { type: 'removed', content: 'export function LoginForm() {', oldNumber: 4 },
                    {
                        type: 'added',
                        content: 'export function LoginForm({ onSubmit }: LoginFormProps) {',
                        newNumber: 6,
                    },
                    {
                        type: 'context',
                        content: "  const [email, setEmail] = useState('');",
                        oldNumber: 5,
                        newNumber: 7,
                    },
                    {
                        type: 'context',
                        content: "  const [password, setPassword] = useState('');",
                        oldNumber: 6,
                        newNumber: 8,
                    },
                    {
                        type: 'added',
                        content: '  const [isLoading, setIsLoading] = useState(false);',
                        newNumber: 9,
                    },
                ],
            },
        ],
    },
    {
        path: 'src/lib/auth.ts',
        additions: 28,
        deletions: 0,
        status: 'added',
        hunks: [
            {
                header: '@@ -0,0 +1,8 @@',
                lines: [
                    { type: 'added', content: "import { hash } from 'bcrypt';", newNumber: 1 },
                    { type: 'added', content: '', newNumber: 2 },
                    {
                        type: 'added',
                        content: 'export async function hashPassword(password: string) {',
                        newNumber: 3,
                    },
                    { type: 'added', content: '  return hash(password, 10);', newNumber: 4 },
                    { type: 'added', content: '}', newNumber: 5 },
                ],
            },
        ],
    },
    {
        path: 'src/utils/legacy-auth.ts',
        additions: 0,
        deletions: 35,
        status: 'deleted',
        hunks: [
            {
                header: '@@ -1,5 +0,0 @@',
                lines: [
                    { type: 'removed', content: '// Legacy auth utilities', oldNumber: 1 },
                    { type: 'removed', content: 'export function oldLogin() {', oldNumber: 2 },
                    { type: 'removed', content: "  return fetch('/api/login');", oldNumber: 3 },
                    { type: 'removed', content: '}', oldNumber: 4 },
                ],
            },
        ],
    },
    {
        path: 'src/services/user-service.ts',
        oldPath: 'src/services/user.ts',
        additions: 5,
        deletions: 2,
        status: 'renamed',
        hunks: [
            {
                header: '@@ -1,4 +1,7 @@',
                lines: [
                    { type: 'removed', content: "import { db } from './db';", oldNumber: 1 },
                    { type: 'added', content: "import { db } from '../lib/db';", newNumber: 1 },
                    { type: 'added', content: "import { hashPassword } from '../lib/auth';", newNumber: 2 },
                    { type: 'context', content: '', oldNumber: 2, newNumber: 3 },
                    { type: 'context', content: 'export class UserService {', oldNumber: 3, newNumber: 4 },
                ],
            },
        ],
    },
];
const meta = {
    title: 'Drawers/Review/DiffView',
    component: DiffView,
    tags: ['autodocs'],
    parameters: {
        layout: 'fullscreen',
    },
    decorators: [
        (Story) => (_jsx("div", { style: {
                height: '600px',
                width: '500px',
                overflow: 'auto',
                border: '1px solid var(--color-border)',
            }, children: _jsx("div", { style: { padding: '16px' }, children: _jsx(Story, {}) }) })),
    ],
};
export default meta;
/** Default — multiple files with various change types. */
export const Default = {
    args: {
        fileDiffs: sampleFiles,
    },
};
/** Single modified file. */
export const SingleFile = {
    args: {
        fileDiffs: [sampleFiles[0]],
    },
};
/** Only new files added. */
export const OnlyAdditions = {
    args: {
        fileDiffs: [sampleFiles[1]],
    },
};
/** Only deleted files. */
export const OnlyDeletions = {
    args: {
        fileDiffs: [sampleFiles[2]],
    },
};
/** Renamed file. */
export const RenamedFile = {
    args: {
        fileDiffs: [sampleFiles[3]],
    },
};
/** Empty diff list — renders nothing. */
export const EmptyDiffs = {
    args: {
        fileDiffs: [],
    },
};
