import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "monkey-style-guide";
import * as i2 from "@angular/common";
import * as i3 from "@ngx-translate/core";
export class CurrencyConfigComponent {
    constructor(modalService) {
        this.modalService = modalService;
        this.config = null;
        this._currency = 'BRL';
        this._currencies = ['BRL'];
        this.callback = () => { };
        // not to do
    }
    ngOnInit() {
        const { config } = this;
        this._currency = config?.data?.currency;
        this._currencies = config?.data?.currencies;
        this.callback = config?.data?.callback;
    }
    onClose() {
        this.modalService.close(this.modalRef);
        this.callback?.(this._currency);
    }
    onHandleChangeCurrency(currency) {
        this._currency = currency;
    }
}
CurrencyConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CurrencyConfigComponent, deps: [{ token: i1.MonkeyStyleGuideModalService }], target: i0.ɵɵFactoryTarget.Component });
CurrencyConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: CurrencyConfigComponent, selector: "monkeyecx-currency-config", inputs: { config: "config", modalRef: "modalRef" }, ngImport: i0, template: "<monkey-modal [config]=\"config\" [modalRef]=\"modalRef\" *ngIf=\"config\">\n  <div class=\"alert-body\">\n    <span class=\"title\">\n      {{ 'MECX-ALERTS.CONFIG.CURRENCY.TITLE' | translate }}\n    </span>\n    <span class=\"message\">\n      {{ 'MECX-ALERTS.CONFIG.CURRENCY.SUB-TITLE' | translate }}\n    </span>\n    <monkey-radiobutton [value]=\"_currency\"\n      (onChange)=\"onHandleChangeCurrency($event)\">\n      <monkey-option \n        [label]=\"'CURRENCIES.'+currency | translate\"\n        [value]=\"currency\"\n        *ngFor=\"let currency of _currencies\">\n      </monkey-option>\n    </monkey-radiobutton>\n    <span class=\"info\">\n      {{ 'MECX-ALERTS.CONFIG.CURRENCY.INFO' | translate }}\n    </span>\n  </div>\n  <div class=\"alert-footer\">\n    <monkey-button type=\"tertiary\" color=\"theme\" (click)=\"onClose()\">\n      {{ 'BUTTONS.CONFIRM' | translate }}\n    </monkey-button>\n  </div>\n</monkey-modal>", styles: [":host ::ng-deep monkey-modal mecx-monkey-modal{padding:0}:host ::ng-deep monkey-modal mecx-monkey-modal .body{margin-bottom:0}:host ::ng-deep monkey-modal .mecx-monkey-modal__size-md{max-width:448px}:host ::ng-deep mecx-form-field mecx-form-field-footer{display:none}:host ::ng-deep monkey-radiobutton mecx-form-field mecx-form-field-body.radiobutton{gap:12px}:host .alert-header{height:100%}@media screen and (max-width: 959px){:host .alert-header{min-height:212px}}:host .alert-header img{border-radius:12px 12px 0 0;-o-object-fit:cover;object-fit:cover;width:100%;max-height:280px}@media screen and (max-width: 959px){:host .alert-header img{height:200px}}:host .alert-body{display:flex;flex-direction:column;gap:16px;padding:24px;margin:auto}:host .alert-body .title{font-style:normal;font-weight:700;font-size:32px;line-height:40px;color:#1f2024}:host .alert-body .message{font-style:normal;font-weight:400;font-size:16px;line-height:24px;letter-spacing:.03em;color:#545a63}:host .alert-body .info{color:#9a9ca1;line-height:24px;font-size:14px}:host .alert-footer{display:flex;justify-content:flex-end;align-items:center;padding:0 24px 24px;position:sticky;bottom:0;background:#fafafa}\n"], components: [{ type: i1.MonkeyModalComponent, selector: "monkey-modal", inputs: ["config", "modalRef", "onHandleConfirm"] }, { type: i1.MonkeyRadioButtonComponent, selector: "monkey-radiobutton", inputs: ["label", "helperMessage", "placeholder", "icon", "infoMessage", "errorMessage", "value"], outputs: ["onChange"] }, { type: i1.MonkeyOptionComponent, selector: "monkey-option", inputs: ["type", "label", "value", "selectAll", "selected", "enableClick"], outputs: ["onSelectOption"] }, { type: i1.MonkeyButtonComponent, selector: "monkey-button", inputs: ["label", "icon", "iconPosition", "type", "color", "disabled", "size"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i3.TranslatePipe } });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CurrencyConfigComponent, decorators: [{
            type: Component,
            args: [{ selector: 'monkeyecx-currency-config', template: "<monkey-modal [config]=\"config\" [modalRef]=\"modalRef\" *ngIf=\"config\">\n  <div class=\"alert-body\">\n    <span class=\"title\">\n      {{ 'MECX-ALERTS.CONFIG.CURRENCY.TITLE' | translate }}\n    </span>\n    <span class=\"message\">\n      {{ 'MECX-ALERTS.CONFIG.CURRENCY.SUB-TITLE' | translate }}\n    </span>\n    <monkey-radiobutton [value]=\"_currency\"\n      (onChange)=\"onHandleChangeCurrency($event)\">\n      <monkey-option \n        [label]=\"'CURRENCIES.'+currency | translate\"\n        [value]=\"currency\"\n        *ngFor=\"let currency of _currencies\">\n      </monkey-option>\n    </monkey-radiobutton>\n    <span class=\"info\">\n      {{ 'MECX-ALERTS.CONFIG.CURRENCY.INFO' | translate }}\n    </span>\n  </div>\n  <div class=\"alert-footer\">\n    <monkey-button type=\"tertiary\" color=\"theme\" (click)=\"onClose()\">\n      {{ 'BUTTONS.CONFIRM' | translate }}\n    </monkey-button>\n  </div>\n</monkey-modal>", styles: [":host ::ng-deep monkey-modal mecx-monkey-modal{padding:0}:host ::ng-deep monkey-modal mecx-monkey-modal .body{margin-bottom:0}:host ::ng-deep monkey-modal .mecx-monkey-modal__size-md{max-width:448px}:host ::ng-deep mecx-form-field mecx-form-field-footer{display:none}:host ::ng-deep monkey-radiobutton mecx-form-field mecx-form-field-body.radiobutton{gap:12px}:host .alert-header{height:100%}@media screen and (max-width: 959px){:host .alert-header{min-height:212px}}:host .alert-header img{border-radius:12px 12px 0 0;-o-object-fit:cover;object-fit:cover;width:100%;max-height:280px}@media screen and (max-width: 959px){:host .alert-header img{height:200px}}:host .alert-body{display:flex;flex-direction:column;gap:16px;padding:24px;margin:auto}:host .alert-body .title{font-style:normal;font-weight:700;font-size:32px;line-height:40px;color:#1f2024}:host .alert-body .message{font-style:normal;font-weight:400;font-size:16px;line-height:24px;letter-spacing:.03em;color:#545a63}:host .alert-body .info{color:#9a9ca1;line-height:24px;font-size:14px}:host .alert-footer{display:flex;justify-content:flex-end;align-items:center;padding:0 24px 24px;position:sticky;bottom:0;background:#fafafa}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.MonkeyStyleGuideModalService }]; }, propDecorators: { config: [{
                type: Input
            }], modalRef: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 