function generateSpacing(nums: number[], divisor = 4): Record<number, string> {
	return nums.reduce<Record<number, string>>((acc, n) => {
		acc[n] = `${n / divisor}rem`;
		return acc;
	}, {});
}

/** @type {import('tailwindcss').Config} */
export default {
	content: ["./src/**/*.{js,jsx,ts,tsx}"],
	theme: {
		extend: {
			spacing: generateSpacing([360]),
			colors: {
				background: "var(--md-sys-color-background)",
				"on-background": "var(--md-sys-color-on-background)",
				surface: "var(--md-sys-color-surface)",
				"surface-dim": "var(--md-sys-color-surface-dim)",
				"surface-bright": "var(--md-sys-color-surface-bright)",
				"surface-container-lowest": "var(--md-sys-color-surface-container-lowest)",
				"surface-container-low": "var(--md-sys-color-surface-container-low)",
				"surface-container": "var(--md-sys-color-surface-container)",
				"surface-container-high": "var(--md-sys-color-surface-container-high)",
				"surface-container-highest": "var(--md-sys-color-surface-container-highest)",
				"on-surface": "var(--md-sys-color-on-surface)",
				"surface-variant": "var(--md-sys-color-surface-variant)",
				"on-surface-variant": "var(--md-sys-color-on-surface-variant)",
				"inverse-surface": "var(--md-sys-color-inverse-surface)",
				"inverse-on-surface": "var(--md-sys-color-inverse-on-surface)",
				outline: "var(--md-sys-color-outline)",
				"outline-variant": "var(--md-sys-color-outline-variant)",
				shadow: "var(--md-sys-color-shadow)",
				scrim: "var(--md-sys-color-scrim)",
				"surface-tint": "var(--md-sys-color-surface-tint)",
				primary: "var(--md-sys-color-primary)",
				"on-primary": "var(--md-sys-color-on-primary)",
				"primary-container": "var(--md-sys-color-primary-container)",
				"on-primary-container": "var(--md-sys-color-on-primary-container)",
				"inverse-primary": "var(--md-sys-color-inverse-primary)",
				secondary: "var(--md-sys-color-secondary)",
				"on-secondary": "var(--md-sys-color-on-secondary)",
				"secondary-container": "var(--md-sys-color-secondary-container)",
				"on-secondary-container": "var(--md-sys-color-on-secondary-container)",
				tertiary: "var(--md-sys-color-tertiary)",
				"on-tertiary": "var(--md-sys-color-on-tertiary)",
				"tertiary-container": "var(--md-sys-color-tertiary-container)",
				"on-tertiary-container": "var(--md-sys-color-on-tertiary-container)",
				error: "var(--md-sys-color-error)",
				"on-error": "var(--md-sys-color-on-error)",
				"error-container": "var(--md-sys-color-error-container)",
				"on-error-container": "var(--md-sys-color-on-error-container)"
			}
		}
	},
	plugins: []
};
