/**
 * @fileoverview added by tsickle
 * Generated from: lib/user/settings/settings.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component } from '@angular/core';
import { TranslateService } from '../../shared/translate/services/translate.service';
import { ThemeService } from './theme/theme.service';
export class SettingsComponent {
    /**
     * @param {?} translateService
     * @param {?} themeService
     */
    constructor(translateService, themeService) {
        this.translateService = translateService;
        this.themeService = themeService;
    }
    /**
     * @return {?}
     */
    ngOnInit() {
        this.selectedLanguage = this.translateService.selectedLanguage;
    }
    /**
     * @param {?} event
     * @return {?}
     */
    changeLanguage(event) {
        this.selectedLanguage = event.detail.value;
        this.translateService.use(this.selectedLanguage);
    }
    /**
     * @param {?} event
     * @return {?}
     */
    onThemeChange(event) {
        if (event && event.detail) {
            event.detail.checked ? this.themeService.enableDark() : this.themeService.enableLight();
        }
    }
}
SettingsComponent.decorators = [
    { type: Component, args: [{
                selector: 'inc-settings',
                template: "<ion-card class=\"ion-padding ion-no-margin\">\r\n  <ion-item lines=\"none\">\r\n    <ion-label id=\"languageLabel\">{{'LANGUAGE' | translate}}</ion-label>\r\n    <ion-select id=\"languageSelector\" placeholder=\"{{'CHOOSE_ONE' | translate}}\" interface=\"popover\"\r\n      (ionChange)=\"changeLanguage($event)\" [value]=\"selectedLanguage\">\r\n      <ion-select-option value=\"en\">{{'LANGUAGE_EN' | translate}}</ion-select-option>\r\n      <ion-select-option value=\"hu\">{{'LANGUAGE_HU' | translate}}</ion-select-option>\r\n    </ion-select>\r\n  </ion-item>\r\n  <ion-item lines=\"none\">\r\n    <ion-label id=\"languageLabel\">{{'DARK_THEME' | translate}}</ion-label>\r\n    <ion-toggle value=\"false\" (ionChange)=\"onThemeChange($event)\"></ion-toggle>\r\n  </ion-item>\r\n</ion-card>",
                styles: ["::ng-deep ion-select-popover{background-color:#fff}::ng-deep ion-select-popover ion-item{--inner-border-width:0}"]
            }] }
];
/** @nocollapse */
SettingsComponent.ctorParameters = () => [
    { type: TranslateService },
    { type: ThemeService }
];
if (false) {
    /** @type {?} */
    SettingsComponent.prototype.selectedLanguage;
    /**
     * @type {?}
     * @private
     */
    SettingsComponent.prototype.translateService;
    /**
     * @type {?}
     * @private
     */
    SettingsComponent.prototype.themeService;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2V0dGluZ3MuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGluY2xvdWRlZC9pb25pYzQtaW5jbG91ZGVkLWxpYi8iLCJzb3VyY2VzIjpbImxpYi91c2VyL3NldHRpbmdzL3NldHRpbmdzLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQVUsTUFBTSxlQUFlLENBQUM7QUFDbEQsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sbURBQW1ELENBQUM7QUFDckYsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBT3JELE1BQU0sT0FBTyxpQkFBaUI7Ozs7O0lBSTVCLFlBQW9CLGdCQUFrQyxFQUFVLFlBQTBCO1FBQXRFLHFCQUFnQixHQUFoQixnQkFBZ0IsQ0FBa0I7UUFBVSxpQkFBWSxHQUFaLFlBQVksQ0FBYztJQUFJLENBQUM7Ozs7SUFFL0YsUUFBUTtRQUNOLElBQUksQ0FBQyxnQkFBZ0IsR0FBRyxJQUFJLENBQUMsZ0JBQWdCLENBQUMsZ0JBQWdCLENBQUM7SUFDakUsQ0FBQzs7Ozs7SUFFRCxjQUFjLENBQUMsS0FBVTtRQUN2QixJQUFJLENBQUMsZ0JBQWdCLEdBQUcsS0FBSyxDQUFDLE1BQU0sQ0FBQyxLQUFLLENBQUM7UUFDM0MsSUFBSSxDQUFDLGdCQUFnQixDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsZ0JBQWdCLENBQUMs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