import type { Meta, StoryObj } from '@storybook/react';
import { AnalyticsView, AnalyticsViewSkeleton } from './analytics-view';

const meta: Meta<typeof AnalyticsView> = {
  title: 'Components/Features/Views/AnalyticsView',
  component: AnalyticsView,
  parameters: { layout: 'fullscreen' },
  tags: ['autodocs'],
  decorators: [
    (Story) => (
      <div className="bg-kodo-background min-h-layout-page">
        <Story />
      </div>
    ),
  ],
};

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

export const Loading: Story = {
  name: 'Loading',
  render: () => <AnalyticsViewSkeleton />,
};

export const Default: Story = {
  name: 'Par défaut',
  args: { onNavigateTrack: (id: string) => console.log('Navigate to track', id) },
};
