var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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';
var SuccessEcComponent = /** @class */ (function (_super) {
    __extends(SuccessEcComponent, _super);
    function SuccessEcComponent(activedRoute, cartService, router, checkoutService) {
        var _this = _super.call(this) || this;
        _this.activedRoute = activedRoute;
        _this.cartService = cartService;
        _this.router = router;
        _this.checkoutService = checkoutService;
        _this.orderDetails = {};
        _this.params = {};
        _this.from_mp = true;
        _this.ecOnConstruct();
        return _this;
    }
    SuccessEcComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.checkoutService.order$.subscribe(function (res) {
            //console.log('LO QUE LLEGA EN ORDEN', res);
            _this.params = {
                external_reference: res.number,
            };
            _this.payments = res.payments;
        });
        this.ecOnInit();
    };
    SuccessEcComponent.ctorParameters = function () { return [
        { 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);
    return SuccessEcComponent;
}(ComponentHelper));
export { SuccessEcComponent };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3VjY2Vzcy1lYy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZy1lYXN5Y29tbWVyY2UvIiwic291cmNlcyI6WyJsaWIvZWMtY29tcG9uZW50L2NoZWNrb3V0LWVjL3N1Y2Nlc3MtZWMvc3VjY2Vzcy1lYy5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQVUsTUFBTSxlQUFlLENBQUM7QUFDbEQsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLEVBQUUsTUFBTSxpQkFBaUIsQ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hbnkgPSB7fTtcbiAgICAgcHVibGljIGZyb21fbXAgPSB0cnVlO1xuICAgICBwdWJsaWMgcGF5bWVudHM7XG5cbiAgICAgY29uc3RydWN0b3IocHJvdGVjdGVkIGFjdGl2ZWRSb3V0ZTogQWN0aXZhdGVkUm91dGUsIHByb3RlY3RlZCBjYXJ0U2VydmljZTogQ2FydFNlcnZpY2UsIHB1YmxpYyByb3V0ZXI6IFJvdXRlciwgcHJvdGVjdGVkIGNoZWNrb3V0U2VydmljZTogQ2hlY2tvdXRTZXJ2aWNlKSB7XG4gICAgICAgIHN1cGVyKCk7XG4gICAgICAgIHRoaXMuZWNPbkNvbnN0cnVjdCgpXG4gICAgICB9XG5cbiAgICAgbmdPbkluaXQoKSB7XG4gICAgICAgICAgdGhpcy5jaGVja291dFNlcnZpY2Uub3JkZXIkLnN1YnNjcmliZShcbiAgICAgICAgICAgICAgIHJlcyA9PiB7XG4gICAgICAgICAgICAgICAgICAgIC8vY29uc29sZS5sb2coJ0xPIFFVRSBMTEVHQSBFTiBPUkRFTicsIHJlcyk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGFyYW1zID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgIGV4dGVybmFsX3JlZmVyZW5jZTogcmVzLm51bWJlcixcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB0aGlzLnBheW1lbnRzID0gcmVzLnBheW1lbnRzXG4gICAgICAgICAgICAgICB9XG4gICAgICAgICAgKTtcbiAgICAgICAgdGhpcy5lY09uSW5pdCgpXG5cbiAgICAgfVxuXG59XG4iXX0=