import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { describe, expect, it } from 'vitest';
import { render, screen } from '@testing-library/react';
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, } from './alert-dialog.js';
describe('AlertDialog', () => {
    it('should render trigger button', () => {
        render(_jsxs(AlertDialog, { children: [_jsx(AlertDialogTrigger, { children: "Open Dialog" }), _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: "Test Title" }), _jsx(AlertDialogDescription, { children: "Test Description" })] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { children: "Cancel" }), _jsx(AlertDialogAction, { children: "Continue" })] })] })] }));
        expect(screen.getByText('Open Dialog')).toBeInTheDocument();
    });
    it('should have correct data-slot attributes', () => {
        render(_jsxs(AlertDialog, { children: [_jsx(AlertDialogTrigger, { "data-testid": "trigger", children: "Open Dialog" }), _jsxs(AlertDialogContent, { "data-testid": "content", children: [_jsxs(AlertDialogHeader, { "data-testid": "header", children: [_jsx(AlertDialogTitle, { "data-testid": "title", children: "Test Title" }), _jsx(AlertDialogDescription, { "data-testid": "description", children: "Test Description" })] }), _jsxs(AlertDialogFooter, { "data-testid": "footer", children: [_jsx(AlertDialogCancel, { "data-testid": "cancel", children: "Cancel" }), _jsx(AlertDialogAction, { "data-testid": "action", children: "Continue" })] })] })] }));
        const trigger = screen.getByTestId('trigger');
        expect(trigger).toHaveAttribute('data-slot', 'alert-dialog-trigger');
    });
    it('should apply custom className to components', () => {
        render(_jsxs(AlertDialog, { children: [_jsx(AlertDialogTrigger, { className: "custom-trigger", children: "Open Dialog" }), _jsxs(AlertDialogContent, { className: "custom-content", children: [_jsxs(AlertDialogHeader, { className: "custom-header", children: [_jsx(AlertDialogTitle, { className: "custom-title", children: "Test Title" }), _jsx(AlertDialogDescription, { className: "custom-description", children: "Test Description" })] }), _jsxs(AlertDialogFooter, { className: "custom-footer", children: [_jsx(AlertDialogCancel, { className: "custom-cancel", children: "Cancel" }), _jsx(AlertDialogAction, { className: "custom-action", children: "Continue" })] })] })] }));
        expect(screen.getByText('Open Dialog')).toHaveClass('custom-trigger');
    });
});
//# sourceMappingURL=alert-dialog.test.js.map