import { definePreset, updateSurfacePalette } from '@primeuix/themes';
import Aura from '@primeuix/themes/aura';

// Reusable exported accent color constant
export const MY_ACCENT_COLOR = '#aaa';

const MyPreset = definePreset(Aura, {
  components: {
    drawer: {
      header: {
        padding: '1rem 1rem 0.875rem',
      },
      title: {
        fontSize: '1.25rem',
        fontWeight: '500',
      },
      footer: {
        padding: '0.875rem 1rem 1rem',
      },
    },
    message: {
      text: {
        fontSize: '0.875rem',
      },
    },

    card: {
      body: {
        padding: '0.875rem 1rem',
      },
    },
  },
  semantic: {
    ...updateSurfacePalette({
      0: '#fcfcfc',
    }),
    primary: {
      0: '{surface.0}',
      50: '{surface.50}',
      100: '{surface.100}',
      200: '{surface.200}',
      300: '{surface.300}',
      400: '{surface.400}',
      500: '{surface.500}',
      600: '{surface.600}',
      700: '{surface.700}',
      800: '{surface.800}',
      900: '{surface.900}',
      950: '{surface.950}',
    },
    colorScheme: {
      light: {
        surface: {
          0: '#fcfcfc',
          50: '#f8fafc',
          100: '#f1f5f9',
          200: '#e2e8f0',
          300: '#cbd5e1',
          400: '#94a3b8',
          500: '#64748b',
          600: '#475569',
          700: '#334155',
          800: '#1e293b',
          900: '#0f172a',
          950: '#020617',
        },

        primary: {
          color: '{primary.950}',
          contrastColor: '#f0f0f0',
          hoverColor: '{primary.800}',
          activeColor: '{primary.700}',
        },
        highlight: {
          background: '{primary.950}',
          focusBackground: '{primary.700}',
          color: '#f0f0f0',
          focusColor: '#f0f0f0',
        },
      },
      dark: {
        primary: {
          color: '{primary.50}',
          contrastColor: '{primary.950}',
          hoverColor: '{primary.200}',
          activeColor: '{primary.300}',
        },
        highlight: {
          background: '{primary.50}',
          focusBackground: '{primary.300}',
          color: '{primary.950}',
          focusColor: '{primary.950}',
        },
      },
    },
  },
  primitive: {
    ...updateSurfacePalette({
      0: '#fcfcfc',
      50: '#f8fafc',
      100: '#f1f5f9',
      200: '#e2e8f0',
      300: '#cbd5e1',
      400: '#94a3b8',
      500: '#64748b',
      600: '#475569',
      700: '#334155',
      800: '#1e293b',
      900: '#0f172a',
      950: '#020617',
    }),
  },
});

export default MyPreset;
