const preact = require('preact');

module.exports = function triangle(colours) {
    if (colours.length === 1) {
        return (
            <svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" class="ethan-icon" viewBox="0 0 2000 2000" >
                <g transform="matrix(0,1.6438212,-1.6438212,0,2610.8872,-705.22614)">
                      <path class={colours[0]} d="M 1618.09,942.41 830.04,469.5 l -0.28,-0.17 -0.29,-0.15 -0.33,-0.17 -6.23,-3.08 -3.92,5.74 -0.04,0.06 c -1.23,1.8 -2.5,3.67 -3.68,5.44 l -3.63,5.45 4.62,4.64 0.25,0.25 319.17,319.17 -477.7,-177.04 -6.75,-2.5 -3.2,6.45 -5.26,10.61 -3.24,6.53 6.2,3.83 360.78,222.84 -355.81,52.26 -7.56,1.11 0.76,7.6 1.17,11.69 0.72,7.2 h 7.24 960.94 28.88 z m -423.5,-83.11 4.81,1.77 3.62,-3.62 5.68,-5.68 5.65,-5.66 -5.65,-5.66 -278.07,-278.12 611.78,367.08 H 825.43 l 227.48,-32.44 6.87,-0.98 v -6.94 -7.6 -4.46 l -3.79,-2.35 L 790.83,710.4 Z"/>
                      <path class={colours[0]} d="m 445.35,1002.67 h -7.24 l -0.72,7.2 -1.17,11.69 -0.76,7.6 7.56,1.11 355.82,52.27 -360.78,222.84 -6.2,3.83 3.24,6.53 5.26,10.61 3.2,6.45 6.75,-2.5 477.69,-177.05 -319.16,319.16 -0.26,0.26 -4.62,4.64 3.63,5.45 c 1.2,1.81 2.48,3.68 3.72,5.5 l 3.92,5.74 6.23,-3.08 0.33,-0.17 0.29,-0.14 0.28,-0.17 788.05,-472.91 24.76,-14.86 h -28.88 z m 555.66,116.81 5.65,-5.66 -5.65,-5.66 -5.68,-5.68 -3.62,-3.62 -4.8,1.77 -403.76,148.91 265.16,-164.25 3.79,-2.35 v -4.45 -7.6 -6.94 l -6.87,-0.98 -227.48,-32.44 h 716.98 l -611.78,367.08 z" />
                </g>
            </svg>
        );
    }

    return (
        <svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" class="ethan-icon" viewBox="0 0 2000 2000" >
            <g transform="matrix(0,1.6438212,-1.6438212,0,2610.8872,-705.22614)">
                <path class={colours[1]} d="M 1618.09,942.41 830.04,469.5 l -0.28,-0.17 -0.29,-0.15 -0.33,-0.17 -6.23,-3.08 -3.92,5.74 -0.04,0.06 c -1.23,1.8 -2.5,3.67 -3.68,5.44 l -3.63,5.45 4.62,4.64 0.25,0.25 319.17,319.17 -477.7,-177.04 -6.75,-2.5 -3.2,6.45 -5.26,10.61 -3.24,6.53 6.2,3.83 360.78,222.84 -355.81,52.26 -7.56,1.11 0.76,7.6 1.17,11.69 0.72,7.2 h 7.24 960.94 28.88 z m -423.5,-83.11 4.81,1.77 3.62,-3.62 5.68,-5.68 5.65,-5.66 -5.65,-5.66 -278.07,-278.12 611.78,367.08 H 825.43 l 227.48,-32.44 6.87,-0.98 v -6.94 -7.6 -4.46 l -3.79,-2.35 L 790.83,710.4 Z"/>
                <path class={colours[0]} d="m 445.35,1002.67 h -7.24 l -0.72,7.2 -1.17,11.69 -0.76,7.6 7.56,1.11 355.82,52.27 -360.78,222.84 -6.2,3.83 3.24,6.53 5.26,10.61 3.2,6.45 6.75,-2.5 477.69,-177.05 -319.16,319.16 -0.26,0.26 -4.62,4.64 3.63,5.45 c 1.2,1.81 2.48,3.68 3.72,5.5 l 3.92,5.74 6.23,-3.08 0.33,-0.17 0.29,-0.14 0.28,-0.17 788.05,-472.91 24.76,-14.86 h -28.88 z m 555.66,116.81 5.65,-5.66 -5.65,-5.66 -5.68,-5.68 -3.62,-3.62 -4.8,1.77 -403.76,148.91 265.16,-164.25 3.79,-2.35 v -4.45 -7.6 -6.94 l -6.87,-0.98 -227.48,-32.44 h 716.98 l -611.78,367.08 z" />
            </g>
        </svg>
    );
};
