import type { Meta, StoryObj } from '@storybook/react';
import { NotificationSettings } from './NotificationSettings';

const mockNotifications = {
    email_notifications: true,
    push_notifications: false,
    browser_notifications: true,
    email_on_follow: true,
    email_on_like: true,
    email_on_comment: false,
    email_on_message: true,
    email_on_mention: true,
    email_marketing: false,
};

const meta = {
    title: 'Components/Features/Settings/NotificationSettings',
    component: NotificationSettings,
    tags: ['autodocs'],
    argTypes: {
        onChange: { action: 'notifications changed' }
    },
    decorators: [
        (Story) => (
            <div className="max-w-xl mx-auto p-6 border rounded-lg bg-white dark:bg-card dark:text-white">
                <Story />
            </div>
        ),
    ],
} satisfies Meta<typeof NotificationSettings>;

export default meta;
type Story = StoryObj<typeof meta>;

export const Default: Story = {
    args: {
        notifications: mockNotifications,
    },
};
