/**
 * @since Mon Oct 22 2018
 * @author Charles Gouldmann - Klean
 */
// Core imports
import { Component} from '@angular/core'
import {
    trigger,
    state,
    style,
    animate,
    transition
} from '@angular/animations'

// Component
import { MeasurementsComponent } from '@k-core/modules/configurator/components/measurements/cmp.measurements'


// ---- Services
// Core Services
import { HelperService } from '@k-services/svc.helper'

// Module Services
import { StepNavigationService }            from '@k-core/modules/configurator/services/svc.step-navigation'
import { ConfiguratorService }              from '@k-core/modules/configurator/services/svc.configurator'
import { ConfiguratorProductLoaderService } from '@k-core/modules/configurator/services/svc.configurator-product-reloader'

// Pipes
import { TranslatePipe }    from '@k-core/pipes/pipe.translate'


@Component({
    moduleId: module.id+ '',
    selector: 'configurator-measurements-idemobler',
    templateUrl: './template/t--measurements.pug',
    styleUrls: ['sty.measurements.scss'],
    animations: [
        // RotateOnActive
        trigger('show', [
            state('show', style({
                display: 'block'
            })),
            state('hide', style({
                display: 'none'
            })),

            transition('show <=> hide', [
                animate('.2s')
            ])
        ])
    ]
})

export class MeasurementsComponent_IDEmobler extends MeasurementsComponent {

    constructor(
        _translate: TranslatePipe,
        _configurator: ConfiguratorService,
        _preset: ConfiguratorProductLoaderService,
        _helper: HelperService,
        private _stepNavigation: StepNavigationService
    ) {
        super(_translate, _configurator, _preset, _helper)

        _configurator.validationResults$.subscribe((response) => {
            this.validationResults = response
        })
    }

    //  ---- Variables ---- \\
    validationResults = new Map
    Array = Array

    // Media ----
    media_square_path: string = 'assets/images/ilva/window_square--guides.svg'
    media_angle_right_path: string = 'assets/images/ilva/window_angle_right--guides.svg'
    media_angle_left_path: string = 'assets/images/ilva/window_angle_left--guides.svg'


    // ---- Lifecycle hooks ---- \\
    


    // ---- Functions ---- \\

    /**
     * Go to next step
     */
    nextStep() {
        this._stepNavigation.stepInDirection('next')
    }


}