var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { Component } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { ComponentHelper } from '../../../classes/component-helper';
import { CartService } from '../../../services/cart.service';
import { CheckoutService } from '../../../services/checkout/checkout.service';
let SuccessEcComponent = class SuccessEcComponent extends ComponentHelper {
    constructor(activedRoute, cartService, router, checkoutService) {
        super();
        this.activedRoute = activedRoute;
        this.cartService = cartService;
        this.router = router;
        this.checkoutService = checkoutService;
        this.orderDetails = {};
        this.params = {};
        this.from_mp = true;
        this.ecOnConstruct();
    }
    ngOnInit() {
        this.checkoutService.order$.subscribe(res => {
            //console.log('LO QUE LLEGA EN ORDEN', res);
            this.params = {
                external_reference: res.number,
            };
            this.payments = res.payments;
        });
        this.ecOnInit();
    }
};
SuccessEcComponent.ctorParameters = () => [
    { type: ActivatedRoute },
    { type: CartService },
    { type: Router },
    { type: CheckoutService }
];
SuccessEcComponent = __decorate([
    Component({
        selector: 'app-order-success-ec',
        template: "<div id=\"container\" class=\"flex-center generalContainer container\">\n     <div class=\"Main\">\n          <div class=\"wrap\">\n               <div class=\"row\">\n                <div class=\"col-12\">\n                    <br>\n                </div>\n                    <div class=\"col-md-12 col-12\">\n                         <h4 class=\"titpage center-block text-center\">{{ ('thanks-for-buying' | translate) | uppercase }}</h4>\n                    </div>\n               </div>\n               <div class=\"row\">\n                    <div class=\"col-md-12 col-12 text-center\">\n                         <h4>{{ 'thanks-details' | translate }}</h4>\n                         <h5>{{ ('number' | translate) + ': ' + params.external_reference }}</h5>\n                         <h5>{{ ((params.payment_status || 'pending') | translate) }}</h5>\n                         <!-- <h5 *ngIf=\"!from_mp\">{{ ('will_contact' | translate) }}</h5> -->\n                         <br>\n                         <!-- <a routerLink=\"/collection\"><button class=\"comprar\">{{ 'continue-shopping' | translate }}</button></a> -->\n                         <br>\n                         <br>\n                    </div>\n               </div>\n          </div>\n     </div>\n</div>",
        styles: [".capitalize{text-transform:capitalize!important}.flex-center{padding-top:2em;height:60vh;align-items:center!important;justify-content:center;display:flex}"]
    })
], SuccessEcComponent);
export { SuccessEcComponent };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3VjY2Vzcy1lYy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZy1lYXN5Y29tbWVyY2UvIiwic291cmNlcyI6WyJsaWIvZWMtY29tcG9uZW50L2NoZWNrb3V0LWVjL3N1Y2Nlc3MtZWMvc3VjY2Vzcy1lYy5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBVSxNQUFNLGVBQWUsQ0FBQztBQUNsRCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBRXpELE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQztBQUNwRSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDN0QsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLDZDQUE2QyxDQUFDO0FBTzlFLElBQWEsa0JBQWtCLEdBQS9CLE1BQWEsa0JBQW1CLFNBQVEsZUFBZTtJQU9sRCxZQUFzQixZQUE0QixFQUFZLFdBQXdCLEVBQVMsTUFBYyxFQUFZLGVBQWdDO1FBQ3RKLEtBQUssRUFBRSxDQUFDO1FBRFcsaUJBQVksR0FBWixZQUFZLENBQWdCO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gIHRoaXMuY2hlY2tvdXRTZXJ2aWNlLm9yZGVyJC5zdWJzY3JpYmUoXG4gICAgICAgICAgICAgICByZXMgPT4ge1xuICAgICAgICAgICAgICAgICAgICAvL2NvbnNvbGUubG9nKCdMTyBRVUUgTExFR0EgRU4gT1JERU4nLCByZXMpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnBhcmFtcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICBleHRlcm5hbF9yZWZlcmVuY2U6IHJlcy5udW1iZXIsXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wYXltZW50cyA9IHJlcy5wYXltZW50c1xuICAgICAgICAgICAgICAgfVxuICAgICAgICAgICk7XG4gICAgICAgIHRoaXMuZWNPbkluaXQoKVxuXG4gICAgIH1cblxufVxuIl19