import type { Meta, StoryObj } from '@storybook/react' import { Home, Users, Settings, Key, Webhook, BarChart, Package } from 'lucide-react' import { SidebarProvider, SidebarInset } from '@mdxui/primitives/sidebar' import { AppSidebar } from '../components/app-sidebar' import { NavMain } from '../components/nav-main' import { NavUser } from '../components/nav-user' import { AppProvider } from '../context/app-context' import { NavigationProvider } from '../context/navigation-context' import { AuthProvider } from '../context/auth-context' import { ThemeProvider } from '../context/theme-context' import type { AuthProvider as AuthProviderInterface, NavItem } from '../types' const navItems: NavItem[] = [ { title: 'Dashboard', url: '/admin', icon: Home }, { title: 'Users', url: '/admin/users', icon: Users }, { title: 'API Keys', url: '/admin/api-keys', icon: Key }, { title: 'Webhooks', url: '/admin/webhooks', icon: Webhook, items: [ { title: 'Endpoints', url: '/admin/webhooks/endpoints' }, { title: 'Logs', url: '/admin/webhooks/logs' }, ], }, { title: 'Analytics', url: '/admin/analytics', icon: BarChart }, { title: 'Settings', url: '/admin/settings', icon: Settings }, ] const mockAuthProvider: AuthProviderInterface = { login: async () => {}, logout: async () => {}, checkAuth: async () => {}, checkError: async () => {}, getIdentity: async () => ({ id: '1', fullName: 'John Doe', email: 'john@example.com', avatar: 'https://github.com/shadcn.png', }), getPermissions: async () => ['admin'], } const mockAppConfig = { name: 'Admin', description: 'Dashboard', basePath: '/admin', } const meta: Meta = { title: 'App/AppSidebar', component: AppSidebar, tags: ['autodocs'], parameters: { layout: 'fullscreen', }, decorators: [ (Story) => (

Main Content

Content area next to the sidebar.

), ], } export default meta type Story = StoryObj export const Default: Story = { args: { nav: , footer: , }, } export const WithCustomHeader: Story = { args: { header: (
Custom Header
), nav: , footer: , }, } export const WithCustomLogo: Story = { args: { logo: (
), nav: , footer: , }, } export const NavOnly: Story = { args: { nav: , }, } export const FloatingVariant: Story = { args: { variant: 'floating', nav: , footer: , }, }