import type { Meta, StoryObj } from '@storybook/react' import { AppBreadcrumbs } from '../components/app-breadcrumbs' import { NavigationProvider } from '../context/navigation-context' import type { NavigationProvider as NavigationProviderInterface } from '../types' // Create a mock navigation provider with a configurable path const createMockNavigationProvider = (path: string): NavigationProviderInterface => ({ navigate: () => {}, getCurrentPath: () => path, LinkComponent: ({ href, children, className }) => ( {children} ), }) const meta: Meta = { title: 'App/AppBreadcrumbs', component: AppBreadcrumbs, tags: ['autodocs'], parameters: { layout: 'padded', }, } export default meta type Story = StoryObj export const Default: Story = { decorators: [ (Story) => ( ), ], args: { basePath: '/admin', }, } export const CustomItems: Story = { decorators: [ (Story) => ( ), ], args: { items: [ { label: 'Dashboard', href: '/admin' }, { label: 'Users', href: '/admin/users' }, { label: 'John Doe' }, ], }, } export const DeepPath: Story = { decorators: [ (Story) => ( ), ], args: { basePath: '/admin', labels: { 'api-keys': 'API Keys', }, }, } export const WithCustomLabels: Story = { decorators: [ (Story) => ( ), ], args: { basePath: '/admin', labels: { saas: 'SaaS Admin', customers: 'Customer Management', }, }, } export const WithNumericId: Story = { decorators: [ (Story) => ( ), ], args: { basePath: '/admin', }, } export const NoHome: Story = { decorators: [ (Story) => ( ), ], args: { basePath: '/admin', showHome: false, }, } export const CustomHome: Story = { decorators: [ (Story) => ( ), ], args: { basePath: '/admin', homeLabel: 'Home', homePath: '/', }, }