import type { Meta, StoryObj } from '@storybook/react';
import { TemplateContent } from './TemplateContent';
import { MemoryRouter } from 'react-router-dom';
import { LayoutProvider } from '../../../contexts/LayoutContext';
import React from 'react';

const meta: Meta<typeof TemplateContent> = {
  title: 'Pages/TemplateContent',
  component: TemplateContent,
  decorators: [
    Story => (
      <MemoryRouter initialEntries={['/template']}>
        <LayoutProvider>
          <Story />
        </LayoutProvider>
      </MemoryRouter>
    ),
  ],
  parameters: {
    layout: 'fullscreen',
    docs: {
      description: {
        component:
          'Kitchen-sink showcase of all Xertica UI primitives. The Maps section requires a Google Maps API key and will not render in Storybook without one.',
      },
    },
  },
};

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

export const Default: Story = {
  args: {
    user: {
      name: 'Ariel Santos',
      email: 'ariel@xertica.com',
      avatar: 'https://github.com/shadcn.png',
    },
    onLogout: () => console.log('logout'),
    onSettings: () => console.log('settings'),
  },
};
