import type { ThemeConfig } from 'antd';

export const theme: ThemeConfig = {
  token: {
    // Primary colors
    colorPrimary: '#1677ff',
    colorSuccess: '#52c41a',
    colorError: '#ff4d4f',
    colorWarning: '#faad14',
    colorInfo: '#1677ff',

    // Typography - compact for high density
    fontSize: 13,
    fontFamily:
      "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",

    // Spacing - tighter for density
    borderRadius: 4,
    padding: 12,
    paddingSM: 8,
    paddingXS: 4,

    // Layout
    controlHeight: 32,
    controlHeightSM: 24,
    controlHeightLG: 40,
  },
  components: {
    Table: {
      cellPaddingBlock: 8,
      cellPaddingInline: 12,
      headerBg: '#fafafa',
      rowHoverBg: '#f5f5f5',
      borderColor: '#f0f0f0',
    },
    Layout: {
      siderBg: '#001529',
      headerBg: '#fff',
      bodyBg: '#f5f5f5',
    },
    Menu: {
      darkItemBg: '#001529',
      darkSubMenuItemBg: '#000c17',
    },
    Form: {
      labelFontSize: 13,
      verticalLabelPadding: '0 0 4px',
    },
    Card: {
      paddingLG: 16,
    },
    Statistic: {
      titleFontSize: 12,
      contentFontSize: 20,
    },
  },
};

// Danish locale configuration
export const daLocale = {
  locale: 'da',
  // Number formatting for Danish
  numberFormat: {
    decimalSeparator: ',',
    thousandSeparator: '.',
    currencySymbol: 'kr.',
    currencyPosition: 'after' as const,
  },
};

// Color utilities for accounting
export const accountingColors = {
  debit: '#ff4d4f', // Red
  credit: '#52c41a', // Green
  neutral: '#8c8c8c', // Gray
  balance: '#1677ff', // Blue
  warning: '#faad14', // Yellow/Orange
};
