export class SamplingConfiguration {

    allColours = {
        bright: [
            '#847d71',
            '#0d47dd',
            '#0dafdd',
            '#0ddda3',
            '#0ddd3b',
            '#afdd0d',
            '#dda30d',
            '#dd3b0d',
            '#dd0d47',
            '#dd0daf'
        ],
        medium: [
            '#ad4f28',
            '#db8b3e',
            '#1bb5a9',
            '#107d83',
            '#00485e'
        ],
        dark: [
            '#322f2b',
            '#07246d',
            '#07576d',
            '#076d50',
            '#076d1d',
            '#576d07',
            '#6d5007',
            '#6d1d07',
            '#6d0724',
            '#6d0757'
        ]
    };

    author = 'HC RA';

    // new classes w/o probabilities -> sampling based on data
    // order of classes is important for the sampling process!
    classes = [
        [
            {
                'id': 0,
                'name': {de: 'Verluste', en: 'at least 50% loss'},
                'min': -1000000.0,
                'max': 0.0
            },
            {
                'id': 1,
                'name': {de: 'bis zu\n500 €', en: 'at most 50% loss'},
                'min': 0.0,
                'max': 0.5
            },
            {
                'id': 2,
                'name': {de: 'bis zu\n1000 €', en: 'at most 20% loss'},
                'min': 0.5,
                'max': 1.0
            },
            {
                'id': 3,
                'name': {de: 'bis zu\n2000 €', en: 'at most 20% gain'},
                'min': 1.0,
                'max': 2.0
            },
            {
                'id': 4,
                'name': {de: 'mehr als\n2000 €', en: 'at most 50% gain'},
                'min': 2.0,
                'max': 1000000.0
            }
        ]
    ];

    description = {
        de: 'Vergleich von möglichen Renditen individueller Geldanlagen über eine Laufzeit von',
        en: 'Comparison of 10-year crime risks without and with improved street lighting'
    };

    // major third
    fontRatios = {
        tiny: 0.8,
        small: 1,
        medium: 1.25,
        large: 1.563,
        huge: 1.953
    };

    formatId = 2;
    formats = [
        {
            'id': 0,
            'investmentOptionsIds': [0, 4],
            'investmentOption1Id': 0,
            'investmentOption2Id': 1,
            'modeId': 0,
            'name': 'seqs',
            'periodId': 1,
            'showControls': false,
            'showSampleButton': true,
            'showText': true,
            'showVisualisation': false,
            'sizeId': 0,
            'sortId': null  // not applicable
        },
        {
            'id': 1,
            'investmentOptionsIds': [0, 4],
            'investmentOption1Id': 0,
            'investmentOption2Id': 1,
            'modeId': null,  // not applicable
            'name': 'desc',
            'periodId': 1,
            'showControls': false,
            'showSampleButton': false,
            'showText': false,
            'showVisualisation': true,
            'sizeId': null,  // not applicable
            'sortId': 3
        },
        {
            'id': 2,
            'investmentOptionsIds': [0, 4],
            'investmentOption1Id': 0,
            'investmentOption2Id': 1,
            'modeId': 0,
            'name': 'seqm',
            'periodId': 0,
            'showControls': false,
            'showSampleButton': true,
            'showText': true,
            'showVisualisation': true,
            'sizeId': 0,
            'sortId': 3
        },
        {
            'id': 3,
            'investmentOptionsIds': [0, 4],
            'investmentOption1Id': 0,
            'investmentOption2Id': 1,
            'modeId': 0,
            'name': 'open',
            'periodId': 1,
            'showControls': false,
            'showSampleButton': true,
            'showText': true,
            'showVisualisation': true,
            'sizeId': 0,
            'sortId': 3
        }
    ];

    groupSizes = [
        { 'id': 0, 'value': 1, 'name': 'Individuell' },
        { 'id': 1, 'value': 10, 'name': 'In Gruppen' }
    ];

    intervalSize = 1000;

    investmentOptions = [
        { id: 0, name: 'dax', desc: 'Aktien DE (Dax)'   },
        { id: 1, name: 'gol', desc: 'Gold UK'           },
        { id: 2, name: 'fts', desc: 'Aktien DE (allg.)' },
        { id: 3, name: 'bon', desc: 'Bundesanleihen'    },
        { id: 4, name: 'fes', desc: 'Festgeld'          },
        { id: 5, name: 'sp',  desc: 'Aktien USA (S&P)'  },
        { id: 6, name: 'msci', desc: 'MSCI World'       }
    ];

    investmentRatios = [0, 1];

    labels = {
        groupSize: {de: 'Anzahl der Ziehungen', en: 'Group size'},
        period: { de: 'Jahren', en: 'years'},
        reset: {de: 'Neustart', en: 'Reset'},
        ratio: {
            stock: {de: 'DAX', en: 'Dow Jones'},
            deposit: {de: 'Festgeld', en: 'Deposit'}
        },
        sample: {de: 'Risiken genauer bestimmen', en: 'More\u00a0persons'},
        source: {de: 'Quelle', en: 'Source'}
    };

    maxSamples = 1000;

    modalStates = [
        {
            visibility: 'hidden',
            icon: {
                class: 'icon-info-circled',
                glyph: '&#xe803;'
            }
        },
        {
            visibility: 'visible',
            icon: {
                class: 'icon-cancel-circled',
                glyph: '&#xe804;'
            }
        }
    ];

    modes = [
        { 'id': 0, 'value': 'manuell' },
        { 'id': 1, 'value': 'auto' }
    ];

    nrSamplers = 2;

    overview = {
        prefix: {de: 'Sie haben', en: 'You studied'},
        infix: {
            first: {de: 'keine Ziehung', en: 'no individual'},
            more: {de: 'Ziehungen', en: 'individuals'}
        },
        suffix: {de: 'gespielt', en: ''}
    };

    periods = [
        { 'id': 0, 'value': 10, 'name': 'ten', 'desc': 'short' },
        { 'id': 1, 'value': 20, 'name': 'twe', 'desc': 'medium' },
        { 'id': 2, 'value': 30, 'name': 'thi', 'desc': 'long' }
    ];

    reference = {
        authors: '',
        title: 'lotto.de'
    };

    referenceClasses = [
        {
            prefix: {de: 'Von', en: 'Of each'},
            infix: {de: 'Verbrauchern, die 1000 Euro investieren:', en: 'investors'}
        },
        {
            prefix: {de: 'Von je', en: 'Of each'},
            infix: {de: 'Verbrauchern, die 1000 Euro investieren:', en: 'investors'}
        }
    ];

    subject = {
        'de': 'ziehung',
        'en': 'sampling'
    };

    sorting = [
        { 'id': 0, 'value': 'keine' },
        { 'id': 1, 'value': 'O -> o' },
        { 'id': 2, 'value': 'o -> O' },
        { 'id': 3, 'value': 'Faktenbox\u2122' }
    ];

    title = {
        de: 'Faktenbox: Risiken der Geldanlage zum passenden Zeitpunkt',
        en: 'Improved street lighting against crime'
    };

    textual = {de: 'Verbraucher Nr.', en: 'Individual No.'};

    constructor() {
        this.colours = this.allColours.medium.filter(function(e, i) {
            return e;
        });
    }
}
