import { createBoard } from '@wixc3/react-board';
import { ResponsiveVoronoi } from '@nivo/voronoi';
import cover from './cover.png';

const data = [
    {
        id: 0,
        x: 57.25531671963942,
        y: 51.26582762029981,
    },
    {
        id: 1,
        x: 4.800404510521794,
        y: 20.12179777797083,
    },
    {
        id: 2,
        x: 26.689511332705496,
        y: 47.16652703628797,
    },
    {
        id: 3,
        x: 74.07947188632242,
        y: 65.19387233977444,
    },
    {
        id: 4,
        x: 54.193932655705204,
        y: 4.527522987112054,
    },
    {
        id: 5,
        x: 94.98434597682113,
        y: 87.34718743444212,
    },
    {
        id: 6,
        x: 62.63786018414936,
        y: 89.94109155582326,
    },
    {
        id: 7,
        x: 44.69501022520268,
        y: 83.1790358128088,
    },
    {
        id: 8,
        x: 41.62723776169346,
        y: 9.387858510461534,
    },
    {
        id: 9,
        x: 1.0396890432911254,
        y: 10.46659948376243,
    },
    {
        id: 10,
        x: 6.807589952832949,
        y: 52.372462195646705,
    },
    {
        id: 11,
        x: 13.153549601652493,
        y: 17.109352929768363,
    },
    {
        id: 12,
        x: 39.03763785769427,
        y: 13.691978677244565,
    },
    {
        id: 13,
        x: 42.32254236598587,
        y: 57.21412734752853,
    },
    {
        id: 14,
        x: 35.48280768903111,
        y: 57.78792329626441,
    },
    {
        id: 15,
        x: 2.4060345752011214,
        y: 33.20903483629556,
    },
    {
        id: 16,
        x: 76.04680738971774,
        y: 25.222037324441903,
    },
    {
        id: 17,
        x: 1.7821017041800724,
        y: 20.013254468659802,
    },
    {
        id: 18,
        x: 84.56370755151987,
        y: 16.924962404991906,
    },
    {
        id: 19,
        x: 26.138838462516834,
        y: 81.27886921492357,
    },
    {
        id: 20,
        x: 38.973604945436136,
        y: 39.309797783265864,
    },
    {
        id: 21,
        x: 9.555889622632098,
        y: 35.7649821486715,
    },
    {
        id: 22,
        x: 95.48695942103858,
        y: 45.109341876770756,
    },
    {
        id: 23,
        x: 59.572054424263456,
        y: 17.417106378334644,
    },
    {
        id: 24,
        x: 53.43436286161263,
        y: 81.50896378595225,
    },
    {
        id: 25,
        x: 67.27398579742602,
        y: 48.66486787871578,
    },
    {
        id: 26,
        x: 0.3477193557316127,
        y: 38.40145013384388,
    },
    {
        id: 27,
        x: 89.72134026750058,
        y: 75.2381238848645,
    },
    {
        id: 28,
        x: 66.8598956476829,
        y: 98.75658263416318,
    },
    {
        id: 29,
        x: 99.94674511933867,
        y: 42.82511988091861,
    },
    {
        id: 30,
        x: 94.41742169618152,
        y: 77.74526304926084,
    },
    {
        id: 31,
        x: 50.73064267149123,
        y: 99.28843268374467,
    },
    {
        id: 32,
        x: 23.767104892478773,
        y: 12.245057415045292,
    },
    {
        id: 33,
        x: 53.91003682789493,
        y: 48.99586328378383,
    },
    {
        id: 34,
        x: 78.2793908865211,
        y: 66.49903204312801,
    },
    {
        id: 35,
        x: 84.44794092613121,
        y: 71.78815332375731,
    },
    {
        id: 36,
        x: 60.28323125717121,
        y: 2.5886913391693467,
    },
    {
        id: 37,
        x: 72.59209329023089,
        y: 55.452396837135545,
    },
    {
        id: 38,
        x: 0.562133887570182,
        y: 65.68576268086446,
    },
    {
        id: 39,
        x: 64.84456133756049,
        y: 86.65584120637446,
    },
    {
        id: 40,
        x: 53.294002438031995,
        y: 38.861754106686995,
    },
    {
        id: 41,
        x: 12.601301600926384,
        y: 40.317322501583504,
    },
    {
        id: 42,
        x: 78.07884815081071,
        y: 94.4591679157495,
    },
    {
        id: 43,
        x: 76.16722531637052,
        y: 70.03846766315426,
    },
    {
        id: 44,
        x: 8.453385721919071,
        y: 47.33919947612932,
    },
    {
        id: 45,
        x: 8.574503353044216,
        y: 54.24678205095637,
    },
    {
        id: 46,
        x: 70.65110411239093,
        y: 5.037560449220857,
    },
    {
        id: 47,
        x: 62.6722347122709,
        y: 14.941055079197785,
    },
    {
        id: 48,
        x: 19.71585397688882,
        y: 92.39957299101862,
    },
    {
        id: 49,
        x: 56.342057083062436,
        y: 64.91305653980434,
    },
    {
        id: 50,
        x: 31.160801361817626,
        y: 61.263805126746206,
    },
    {
        id: 51,
        x: 50.39872313308611,
        y: 32.75094395634148,
    },
    {
        id: 52,
        x: 80.95730680845567,
        y: 25.467942545472066,
    },
    {
        id: 53,
        x: 26.70173394326214,
        y: 80.26436306892826,
    },
    {
        id: 54,
        x: 88.35635683795888,
        y: 9.906616345555141,
    },
    {
        id: 55,
        x: 13.513801710590712,
        y: 94.05497065813621,
    },
    {
        id: 56,
        x: 85.81104324893198,
        y: 64.67666099644525,
    },
    {
        id: 57,
        x: 58.06773801307792,
        y: 76.49711309350633,
    },
    {
        id: 58,
        x: 80.47010421044585,
        y: 49.138169741298235,
    },
    {
        id: 59,
        x: 58.90578203979287,
        y: 29.77249208789221,
    },
    {
        id: 60,
        x: 61.399367816387155,
        y: 47.629161596583614,
    },
    {
        id: 61,
        x: 65.0960357113342,
        y: 21.032749608823686,
    },
    {
        id: 62,
        x: 66.28691231832175,
        y: 67.0101430213022,
    },
    {
        id: 63,
        x: 79.79136650268252,
        y: 6.708207801491528,
    },
    {
        id: 64,
        x: 65.01811123934058,
        y: 30.03876189330157,
    },
    {
        id: 65,
        x: 38.54678311509423,
        y: 26.178686940027518,
    },
    {
        id: 66,
        x: 4.927816112306482,
        y: 81.04835156754453,
    },
    {
        id: 67,
        x: 94.24581763491273,
        y: 66.73236586694841,
    },
    {
        id: 68,
        x: 51.916514312578286,
        y: 77.94599429307742,
    },
    {
        id: 69,
        x: 35.195947879500864,
        y: 49.36085808108499,
    },
    {
        id: 70,
        x: 39.00136088793236,
        y: 27.083615626774193,
    },
    {
        id: 71,
        x: 20.831383198395258,
        y: 60.383461908592494,
    },
    {
        id: 72,
        x: 26.891409377131392,
        y: 73.04324380795319,
    },
    {
        id: 73,
        x: 59.31777255319939,
        y: 51.050730775646926,
    },
    {
        id: 74,
        x: 55.069000719397934,
        y: 29.351833715666853,
    },
    {
        id: 75,
        x: 78.37221694579053,
        y: 3.286189396728245,
    },
    {
        id: 76,
        x: 53.52275715257233,
        y: 7.483429567418076,
    },
    {
        id: 77,
        x: 93.21922606478685,
        y: 19.49968097746979,
    },
    {
        id: 78,
        x: 48.88425629684405,
        y: 50.696370612421916,
    },
    {
        id: 79,
        x: 4.239570638783174,
        y: 97.68064548799707,
    },
    {
        id: 80,
        x: 92.08499320832814,
        y: 88.35221471338728,
    },
    {
        id: 81,
        x: 81.55946551571031,
        y: 57.52785958486748,
    },
    {
        id: 82,
        x: 63.34960319278537,
        y: 28.25400201785222,
    },
    {
        id: 83,
        x: 70.10974106436454,
        y: 65.20377834169383,
    },
    {
        id: 84,
        x: 70.31719244913977,
        y: 22.071911879519448,
    },
    {
        id: 85,
        x: 33.4457379352265,
        y: 66.45436021504092,
    },
    {
        id: 86,
        x: 65.45547657040159,
        y: 28.95114755120527,
    },
    {
        id: 87,
        x: 13.953790730236504,
        y: 67.72502384953629,
    },
    {
        id: 88,
        x: 74.94353284168737,
        y: 14.089074296470683,
    },
    {
        id: 89,
        x: 35.14848659709769,
        y: 48.26322823764073,
    },
    {
        id: 90,
        x: 86.72623617818923,
        y: 57.237246216117946,
    },
    {
        id: 91,
        x: 85.5220268677775,
        y: 27.83238958376113,
    },
    {
        id: 92,
        x: 94.52728537483151,
        y: 69.33026349893912,
    },
    {
        id: 93,
        x: 63.180564401964624,
        y: 6.9853187137862705,
    },
    {
        id: 94,
        x: 16.39034271541877,
        y: 9.298875176038312,
    },
    {
        id: 95,
        x: 40.53419800912656,
        y: 18.970636090430105,
    },
    {
        id: 96,
        x: 36.15272100319289,
        y: 88.48769136728372,
    },
    {
        id: 97,
        x: 35.310505537029236,
        y: 93.25395032518038,
    },
    {
        id: 98,
        x: 33.196376270682705,
        y: 96.55359151883741,
    },
    {
        id: 99,
        x: 71.50246002079585,
        y: 16.0827685632557,
    },
];

export default createBoard({
    name: 'Voronoi',
    Board: () => (
        <div style={{ width: '800px', height: '400px' }}>
            <ResponsiveVoronoi
                data={data}
                xDomain={[0, 100]}
                yDomain={[0, 100]}
                enableLinks={true}
                linkLineColor="#cccccc"
                cellLineColor="#c6432d"
                pointSize={6}
                pointColor="#c6432d"
                margin={{ top: 1, right: 1, bottom: 1, left: 1 }}
            />
        </div>
    ),
    cover,
});
