const designProductionMethods = [
    {
        identifier: '042-MR03',
        title: 'Siebdruck B',
        mask: null,
        height: 50,
        width: 40,
        isDefault: false,
        options: {},
        colorPalettes: [],
        customData: {},
        engravingBackgroundColors: null,
        allowBulkNames: false,
        defaultColors: null,
    },
    {
        identifier: '042-PAD03',
        title: 'Tampondruck max 3-farbig',
        mask: null,
        height: 25,
        width: 20,
        isDefault: false,
        options: {},
        colorPalettes: [],
        customData: {},
        engravingBackgroundColors: [],
        allowBulkNames: false,
        defaultColors: null,
    },
];

const designAreaBase = {
    identifier: 'impact full front',
    sequenceNumber: '4',
    title: 'Wirkungsvoll vollständige Vorderseite',
    mask: {},
    baseShape: {
        type: 'Plane',
        x: 50,
        y: 50,
        width: 200,
        height: 250,
    },
    position: { x: 200, y: 300, width: 400, height: 500 },
    designProductionMethods,
    customData: { selectedCameraView: '' },
};

export const designViewsResponse = {
    designViews: [
        {
            identifier: 'impact full front',
            title: 'Wirkungsvoll vollständige Vorderseite',
            sequenceNumber: '4',
            images: {},
            thumbnails: {},
            designAreas: [designAreaBase],
            customData: {},
        },
    ],
};

const designArea = {
    ...designAreaBase,
    designView: {
        identifier: 'impact full front',
        title: 'Wirkungsvoll vollständige Vorderseite',
        sequenceNumber: '4',
        images: {},
        thumbnails: {},
        designAreas: [designAreaBase],
        customData: {},
    },
};

export const recalculateMockInitialStateWithProd = {
    designArea: {
        filteredDesignAreas: [],
        selectedDesignArea: {},
        showHighlight: false,
        previousEditedDesignArea: {},
        initialCanvasPosition: [],
        uploadMaxSize: 52428800,
    },
    configurator: {
        configuration: {
            designdata: {
                [designArea.identifier]: {
                    designProductionMethodIdentifier: designProductionMethods[1].identifier,
                },
            },
            item: {
                settings: {
                    visualizationCreator: '2d',
                    visualizationDesigner: '2d',
                },
            },
        },
    },
    configurationMode: {
        selectedMode: 'designer',
    },
};

export const recalculateMockInitialState = {
    designArea: {
        filteredDesignAreas: [],
        selectedDesignArea: {},
        showHighlight: false,
        previousEditedDesignArea: {},
        initialCanvasPosition: [],
        uploadMaxSize: 52428800,
    },
    configurator: {
        configuration: {
            designdata: {},
            item: {
                settings: {
                    visualizationCreator: '2d',
                    visualizationDesigner: '2d',
                },
            },
        },
    },
    configurationMode: {
        selectedMode: 'designer',
    },
};

export const recalculateMockState = {
    ...recalculateMockInitialStateWithProd,
    designArea: {
        ...recalculateMockInitialStateWithProd.designArea,
        filteredDesignAreas: [designArea],
        initialCanvasPosition: [designArea],
    },
};

export const expectedPosition = { x: 100, y: 150, width: 200, height: 250 };
export const expectedBaseShape = { type: 'Plane', x: 50, y: 50, width: 100, height: 125 };

export const designProductionMethodMap = {
    [designArea.identifier]: designProductionMethods[1],
};

export const visualMode = {
    is2D: () => true,
    is3D: () => false,
};
