import { jsx as _jsx } from "react/jsx-runtime";
import { ReviewCommentCard } from './review-comment-card.js';
import { CommentSide } from '../../../../../../packages/core/src/domain/generated/output.js';
const baseComment = {
    path: 'src/services/auth.ts',
    line: 42,
    body: 'This function does not validate the input before using it in a SQL query, which could lead to SQL injection.',
    side: CommentSide.Right,
    inDiffRange: true,
};
const meta = {
    title: 'Features/CodeReview/ReviewCommentCard',
    component: ReviewCommentCard,
    parameters: { layout: 'padded' },
    tags: ['autodocs'],
    decorators: [
        (Story) => (_jsx("div", { className: "max-w-2xl", children: _jsx(Story, {}) })),
    ],
};
export default meta;
export const Default = {
    args: { comment: baseComment },
};
export const WithSuggestion = {
    args: {
        comment: {
            ...baseComment,
            body: 'Use parameterized queries to prevent SQL injection.',
            suggestion: 'const result = await db.query(\n  "SELECT * FROM users WHERE id = ?",\n  [userId]\n);',
        },
    },
};
export const MultiLine = {
    args: {
        comment: {
            ...baseComment,
            startLine: 38,
            line: 45,
            body: 'This entire block should be wrapped in a try/catch to handle potential database connection errors gracefully.',
        },
    },
};
export const NoSuggestion = {
    args: {
        comment: {
            ...baseComment,
            body: 'Consider adding a timeout to this API call to prevent hanging requests in production.',
        },
    },
};
export const OutsideDiffRange = {
    args: {
        comment: {
            ...baseComment,
            inDiffRange: false,
            body: 'This related function also has the same vulnerability but is outside the current diff range.',
        },
    },
};
export const LongFilePath = {
    args: {
        comment: {
            ...baseComment,
            path: 'packages/core/src/infrastructure/services/authentication/oauth-provider.service.ts',
            body: 'Token refresh logic should handle expired refresh tokens gracefully.',
        },
    },
};
