import type { Shadows } from '@mui/material/styles';
import { alpha } from '@mui/material/styles';

import { ALPHA_100, ALPHA_200, ALPHA_300 } from './opacity';
import { COMMON } from './palette';

// elevations
const getElevations = () => {
  const color1 = alpha(COMMON.black, ALPHA_300);
  const color2 = alpha(COMMON.black, ALPHA_200);
  const color3 = alpha(COMMON.black, ALPHA_100);

  return [
    /** 0 */ 'none',
    /** 1 */ `0px 0px 0px 1px ${color3}`,
    /** 2 */ `0px 1px 4px 0px ${color1}, 0px 1px 1px 0px ${color2}, 0px 1px 1px -1px ${color3}`,
    /** 3 */ `0px 1px 6px 0px ${color1}, 0px 2px 2px 0px ${color2}, 0px 3px 1px -2px ${color3}`,
    /** 4 */ `0px 1px 8px 0px ${color1}, 0px 3px 4px 0px ${color2}, 0px 3px 3px -2px ${color3}`,
    /** 5 */ `0px 1px 10px 0px ${color1}, 0px 4px 5px 0px ${color2}, 0px 2px 4px -1px ${color3}`,
    /** 6 */ `0px 2px 14px 0px ${color1}, 0px 5px 8px 0px ${color2}, 0px 3px 5px -1px ${color3}`,
    /** 7 */ `0px 2px 18px 0px ${color1}, 0px 6px 10px 0px ${color2}, 0px 3px 5px -1px ${color3}`,
    /** 8 */ `0px 2px 16px 1px ${color1}, 0px 7px 10px 1px ${color2}, 0px 4px 5px -2px ${color3}`,
    /** 9 */ `0px 3px 14px 2px ${color1}, 0px 8px 10px 1px ${color2}, 0px 5px 5px -3px ${color3}`,
    /** 10 */ `1px 3px 16px 2px ${color1}, 0px 9px 12px 1px ${color2}, 1px 5px 6px -3px ${color3}`,
    /** 11 */ `1px 3px 18px 3px ${color1}, 0px 10px 14px 1px ${color2}, 2px 6px 6px -3px ${color3}`,
    /** 12 */ `2px 4px 20px 3px ${color1}, 0px 11px 16px 1px ${color2}, 3px 6px 7px -4px ${color3}`,
    /** 13 */ `2px 4px 22px 3px ${color1}, 0px 12px 18px 2px ${color2}, 4px 7px 7px -4px ${color3}`,
    /** 14 */ `2px 5px 24px 3px ${color1}, 0px 13px 20px 2px ${color2}, 5px 7px 8px -4px ${color3}`,
    /** 15 */ `3px 5px 26px 4px ${color1}, 0px 15px 22px 2px ${color2}, 6px 8px 9px -4px ${color3}`,
    /** 16 */ `3px 6px 28px 4px ${color1}, 0px 16px 24px 2px ${color2}, 7px 8px 10px -5px ${color3}`,
    /** 17 */ `3px 6px 30px 5px ${color1}, 0px 18px 26px 2px ${color2}, 8px 9px 11px -5px ${color3}`,
    /** 18 */ `3px 7px 32px 5px ${color1}, 0px 18px 28px 2px ${color2}, 9px 9px 12px -5px ${color3}`,
    /** 19 */ `4px 7px 34px 6px ${color1}, 0px 19px 30px 2px ${color2}, 10px 10px 13px -5px ${color3}`,
    /** 20 */ `4px 8px 36px 6px ${color1}, 0px 20px 33px 2px ${color2}, 11px 10px 14px -5px ${color3}`,
    /** 21 */ `5px 8px 38px 7px ${color1}, 0px 21px 36px 2px ${color2}, 12px 11px 16px -6px ${color3}`,
    /** 22 */ `5px 9px 40px 7px ${color1}, 0px 22px 39px 2px ${color2}, 13px 11px 18px -6px ${color3}`,
    /** 23 */ `6px 10px 42px 8px ${color1}, 0px 23px 42px 2px ${color2}, 14px 12px 20px -7px ${color3}`,
    /** 24 */ `6px 11px 44px 8px ${color1}, 0px 24px 45px 2px ${color2}, 15px 13px 22px -7px ${color3}`,
  ];
};

export default getElevations() as Shadows;
