declare module 'matercolors' {
	class Matercolor {
		constructor(color: string, options?: Options);

		palette: Palette;
		complementary: ColorPalette;
		firstAnalogous: AnalogousTriadicPalette;
		secondAnalogous: AnalogousTriadicPalette;
		firstTriadic: AnalogousTriadicPalette;
		secondTriadic: AnalogousTriadicPalette;

		makePalette(
			paletteName: PaletteName,
			updateRoot?: boolean
		): ColorPalette;
	}

	interface Options {
		threshold: number;
		showContrastText?: boolean;
	}

	export interface ColorPalette {
		'50': string;
		'100': string;
		'200': string;
		'300': string;
		'400': string;
		'500': string;
		'600': string;
		'700': string;
		'800': string;
		'900': string;
		A100: string;
		A200: string;
		A400: string;
		A700: string;
	}

	interface Palette {
		primary: ColorPalette;
		complementary: ColorPalette;
		analogous: AnalogousTriadicPalette;
		triadic: AnalogousTriadicPalette;
	}

	interface AnalogousTriadicPalette {
		primary: ColorPalette;
		secondary: ColorPalette;
	}

	type PaletteName =
		| 'primary'
		| 'complementary'
		| 'firstAnalogous'
		| 'secondAnalogous'
		| 'firstTriadic'
		| 'secondTriadic'
		| 'thirdTriadic'
		| 'analogous'
		| 'triadic';

	export default Matercolor;
}
