import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';

export default defineConfig({
  integrations: [
    starlight({
      title: 'Black Canyon Tickets',
      description: 'Documentation for the Black Canyon Tickets platform',
      logo: {
        src: '/images/logo.png',
        alt: 'Black Canyon Tickets Logo',
      },
      favicon: '/favicon.ico',
      defaultLocale: 'en',
      locales: {
        en: {
          label: 'English',
          lang: 'en',
        },
      },
      social: [
        {
          icon: 'github',
          label: 'GitHub',
          href: 'https://github.com/blackcanyontickets',
        },
        {
          icon: 'email',
          label: 'Email Support',
          href: 'mailto:support@blackcanyontickets.com',
        },
      ],
      customCss: [
        './src/styles/custom.css',
      ],
      expressiveCode: {
        themes: ['github-dark', 'github-light'],
        styleOverrides: {
          borderRadius: '12px',
        },
      },
      sidebar: [
        {
          label: 'Getting Started',
          items: [
            'getting-started/introduction',
            'getting-started/account-setup',
            'getting-started/first-event',
            'getting-started/stripe-connect',
          ],
        },
        {
          label: 'Event Management',
          items: [
            'events/creating-events',
            'events/ticket-types',
            'events/seating-management',
            'events/event-settings',
            'events/publishing-events',
          ],
        },
        {
          label: 'Ticket Sales',
          items: [
            'sales/checkout-process',
            'sales/payment-processing',
            'sales/refunds',
            'sales/reports',
          ],
        },
        {
          label: 'QR Code Scanning',
          items: [
            'scanning/setup',
            'scanning/mobile-scanning',
            'scanning/troubleshooting',
          ],
        },
        {
          label: 'API Documentation',
          items: [
            'api/overview',
            'api/authentication',
            'api/events',
            'api/tickets',
            'api/webhooks',
          ],
        },
        {
          label: 'Support',
          items: [
            'support/faq',
            'support/contact',
            'support/troubleshooting',
          ],
        },
      ],
      editLink: {
        baseUrl: 'https://github.com/blackcanyontickets/docs/edit/main/',
      },
    }),
  ],
});