import { Component, Input, ViewChild } from '@angular/core';
import html2canvas from 'html2canvas';
import { jsPDF } from 'jspdf';
import { BehaviorSubject } from 'rxjs';
import * as i0 from "@angular/core";
import * as i1 from "@spartacus/core";
import * as i2 from "@spartacus/order/root";
import * as i3 from "../../services/cart.service";
import * as i4 from "@angular/common";
export class SharedDownloadOrderComponent {
    constructor(cmsService, cd, orderFacade, cartService) {
        this.cmsService = cmsService;
        this.cd = cd;
        this.orderFacade = orderFacade;
        this.cartService = cartService;
        this.showWaitCursor = new BehaviorSubject(false);
        this.env = sessionStorage.getItem('env');
        this.environment = JSON.parse(this.env);
        this.occeBaseUrl = this.environment.occBaseUrl;
        this.noImage = '../../../../assets/images/pdp-noimage.svg';
        this.downloadView = false;
        this.page = 490;
        this.cmsService
            .getComponentData('OrderDisclaimerContentComponent')
            .subscribe((data) => {
            this.orderMessage = data.content;
        });
    }
    ngOnInit() {
        this.orderId = this.orderFacade.getOrderDetails();
        this.orderId = localStorage.getItem('orderId');
    }
    ngOnDestroy() {
        localStorage.removeItem('orderId');
    }
    orderPdfDownload() {
        this.downLoadPdf.nativeElement.click();
    }
    getOrderDetails() {
        this.showWaitCursor.next(true);
        this.cartService.getOrderDetails(this.orderId).subscribe((res) => {
            var _a;
            this.orderDetails = res;
            this.cartDetails = res === null || res === void 0 ? void 0 : res.entries;
            this.totalPrice = (_a = res === null || res === void 0 ? void 0 : res.totalPrice) === null || _a === void 0 ? void 0 : _a.formattedValue;
            this.cartDetails.forEach((element) => {
                element.configList = [];
                element.configurationInfos.forEach((data) => {
                    if (data.configurationLabel.startsWith('D', 0) || data.configurationLabel.startsWith('A', 0))
                        element.configList.push(data);
                });
            });
            this.showWaitCursor.next(false);
        }, (error) => {
            this.showWaitCursor.next(false);
        });
    }
    download(divRef) {
        this.getOrderDetails();
        this.showWaitCursor.next(true);
        this.downloadView = true;
        setTimeout(() => {
            html2canvas(divRef, {
            // logging: true,
            // allowTaint: true,
            // useCORS: true,
            }).then((canvas) => {
                var _a;
                var imgData = canvas.toDataURL('image/png');
                var imgWidth = 600;
                var pageHeight = 840;
                var imgHeight = (canvas.height * imgWidth) / canvas.width + 10;
                var pageNo = 1;
                var heightLeft = imgHeight;
                var numberOfPages = Math.ceil(imgHeight / pageHeight);
                var doc = new jsPDF('p', 'pt', 'a4');
                var position = 0;
                doc.addImage(imgData, 'PNG', 0, position, imgWidth, imgHeight - 10);
                doc.setFontSize(10);
                doc.text('Page ' + pageNo + ' of ' + numberOfPages, 490, 820);
                heightLeft -= pageHeight;
                while (heightLeft >= 0) {
                    pageNo = pageNo + 1;
                    position = heightLeft - imgHeight;
                    doc.addPage();
                    doc.addImage(imgData, 'PNG', 0, position + 5, imgWidth, imgHeight - 10);
                    heightLeft -= pageHeight;
                    doc.text('Page ' + pageNo + ' of ' + numberOfPages, 490, 820);
                }
                doc.save('Order-Submistion-' + ((_a = this.orderDetails) === null || _a === void 0 ? void 0 : _a.code) + '.pdf');
                this.downloadView = false;
                this.showWaitCursor.next(false);
            });
        }, 1000);
    }
    getProductImage(cart, thumbnail = true) {
        var _a, _b, _c, _d, _e, _f, _g, _h;
        let detailImages = (_a = cart === null || cart === void 0 ? void 0 : cart.product) === null || _a === void 0 ? void 0 : _a.images;
        if (detailImages && ((_b = Object.keys(detailImages)) === null || _b === void 0 ? void 0 : _b.length) > 0) {
            for (let item of detailImages) {
                if (item.format == 'thumbnail') {
                    return item.url;
                }
            }
        }
        let srcUrl;
        if ((cart === null || cart === void 0 ? void 0 : cart.attachments) &&
            ((_c = cart === null || cart === void 0 ? void 0 : cart.attachments) === null || _c === void 0 ? void 0 : _c.length) &&
            ((_d = cart === null || cart === void 0 ? void 0 : cart.product) === null || _d === void 0 ? void 0 : _d.flashingProduct)) {
            srcUrl =
                thumbnail && ((_e = cart === null || cart === void 0 ? void 0 : cart.attachments) === null || _e === void 0 ? void 0 : _e.length) > 1
                    ? (_f = cart === null || cart === void 0 ? void 0 : cart.attachments[1]) === null || _f === void 0 ? void 0 : _f.downloadURL
                    : (_g = cart === null || cart === void 0 ? void 0 : cart.attachments[0]) === null || _g === void 0 ? void 0 : _g.downloadURL;
            detailImages = (_h = (this.environment.occBaseUrl.slice(0, this.environment.occBaseUrl.length - 1) +
                srcUrl)) === null || _h === void 0 ? void 0 : _h.replace('&attachment=true', '');
        }
        if (detailImages && (detailImages === null || detailImages === void 0 ? void 0 : detailImages.length) > 0) {
            return detailImages;
        }
        else {
            return this.noImage;
        }
        // return detailImages ? detailImages : this.noImage;
    }
}
SharedDownloadOrderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedDownloadOrderComponent, deps: [{ token: i1.CmsService }, { token: i0.ChangeDetectorRef }, { token: i2.OrderFacade }, { token: i3.CartService }], target: i0.ɵɵFactoryTarget.Component });
SharedDownloadOrderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SharedDownloadOrderComponent, selector: "app-shared-download-order", inputs: { orderDetailsView: "orderDetailsView", cartDetailsView: "cartDetailsView", isOrder: "isOrder" }, viewQueries: [{ propertyName: "downLoadPdf", first: true, predicate: ["downLoadPDF"], descendants: true }], ngImport: i0, template: "<div class=\"loading \" *ngIf=\"showWaitCursor | async \">Loading&#8230;</div>\r\n<ng-container *ngIf=\"!isOrder else noOrder\">\r\n<div class=\"row\">\r\n    <div class=\"col-sm-12\">\r\n        <div class=\"text-center download_btn\">\r\n            <p class=\"order-action-buttons\">\r\n                <a class=\"btn secondary-button mr-md-5\" title=\"Continue Shopping\" href=\"/c/1\">Continue Shopping</a>\r\n\r\n                <a class=\"btn primary-button customBtn\" title=\"Download\" (click)=\"download(divRef)\">Download</a>\r\n            </p>\r\n        </div>\r\n    </div>\r\n</div>\r\n</ng-container>\r\n<ng-template #noOrder>\r\n    <a (click)=\"download(divRef)\" #downLoadPDF></a>\r\n</ng-template>\r\n<div [ngStyle]=\"{ 'display': downloadView ? 'block' : 'none',position:'absolute',top:'-10000px'}\" #divRef class=\"container printedContainer\">\r\n    <div class=\"row boxMargin fixed-width-row\">\r\n\r\n        <div class=\"col-lg-4 col-sm-6 deliveryInfoBx\">\r\n            <div class=\"row\">\r\n                <ul class=\"col-12 deliveryInfo\">\r\n                    <div class=\"firstChild\">\r\n                        <div class=\"order-heading\"> Order Submission</div>\r\n                        <label> {{orderDetails?.code}} </label>\r\n                    </div>\r\n                    <li>\r\n                        <label> Account:</label>\r\n                        <span class=\"infoValue\">\r\n                            {{orderDetails?.orgCustomer?.orgUnit?.name}}\r\n                        </span>\r\n                    </li>\r\n                    <li>\r\n                        <label>Account NO.:</label>\r\n                        <span class=\"infoValue\">{{orderDetails?.orgCustomer?.orgUnit?.uid}}</span>\r\n                    </li>\r\n                    <li>\r\n                        <label>PO Number:</label>\r\n                        <span class=\"infoValue\">{{orderDetails?.orgCustomer?.orgUnit?.uid}}</span>\r\n                    </li>\r\n                    <li>\r\n                        <label>Submitted On:</label>\r\n                        <span class=\"infoValue\">{{orderDetails?.created | date:'dd/MM/yyyy'}}</span>\r\n                    </li>\r\n                    <li>\r\n                        <label>Submitted By:</label>\r\n                        <span class=\"infoValue\"> {{orderDetails?.orgCustomer?.name}}</span>\r\n                    </li>\r\n\r\n                </ul>\r\n            </div>\r\n        </div>\r\n        <div class=\"col-lg-4 col-sm-6 deliveryInfoBx\">\r\n            <div class=\"row\">\r\n                <ul class=\"col-12 deliveryInfo\">\r\n                    <div class=\"Childbox\">\r\n\r\n                    </div>\r\n                    <li>\r\n                        <div class=\"d-flex\"> <img class=\"pickupdelivery-image\" *ngIf=\"orderDetails?.deliveryMode?.code =='standard_delivery'\" src=\"../../../../../assets/images/delivery.svg\" alt=\"Delivery\" title=\"Delivery\">\r\n                            <img *ngIf=\"orderDetails?.deliveryMode?.code !='standard_delivery'\" class=\"pickupdelivery-image\" src=\"../../../../assets/images/pickup.svg\" alt=\"Click & Collect\" title=\"Click & Collect\">\r\n\r\n\r\n                            <div class=\"d-flex flex-column pl-3\">\r\n                                <span> <b> Delivery Method:</b>\r\n                                    {{orderDetails?.deliveryMode?.name}}\r\n                                </span>\r\n                                <p class=\"mb-0 pt-3\">{{orderDetails?.deliveryMode?.description}}</p>\r\n                            </div>\r\n                        </div>\r\n                    </li>\r\n                    <li>\r\n                        <label> \r\n                            <span *ngIf=\"orderDetails?.deliveryMode?.code =='standard_delivery'\">Delivery Date:</span>\r\n                            <span *ngIf=\"orderDetails?.deliveryMode?.code !='standard_delivery'\">Pickup Date:</span>\r\n                        </label>\r\n                        <span class=\"infoValue\">\r\n                            {{orderDetails?.expectedToDate.split(' ')[0]}}\r\n                        </span>\r\n                    </li>\r\n                    <li>\r\n                        <label>\r\n                            <span *ngIf=\"orderDetails?.deliveryMode?.code =='standard_delivery'\">Delivery Time:</span>\r\n                            <span *ngIf=\"orderDetails?.deliveryMode?.code !='standard_delivery'\">Pickup TIme:</span>\r\n                        </label>\r\n                        <span class=\"infoValue\">{{orderDetails?.expectedToDate.split(' ')[1] }}\r\n                            {{orderDetails?.expectedToDate.split(' ')[2] }}</span>\r\n                    </li>\r\n                    <li>\r\n                        <label>\r\n                            <span *ngIf=\"orderDetails?.deliveryMode?.code =='standard_delivery'\">Delivery Address:</span>\r\n                            <span *ngIf=\"orderDetails?.deliveryMode?.code !='standard_delivery'\">Pickup Address:</span>\r\n                        </label>\r\n                        <span class=\"infoValue\"> {{orderDetails?.deliveryAddress?.formattedAddress}}</span>\r\n                    </li>\r\n\r\n                </ul>\r\n            </div>\r\n        </div>\r\n        <div class=\"col-lg-4 col-sm-6 deliveryInfoBx d-flex flex-column\">\r\n            <img class=\"delivery_logo\" src=\"../../../../assets/images/logo-black.svg\" alt=\"logo\">\r\n            <div class=\"align-notes\">\r\n                <label class=\"font-weight-bold\">Delivery Notes:</label>\r\n\r\n                <span class=\"mb-0\">{{orderDetails?.deliveryNotes}}</span>\r\n            </div>\r\n        </div>\r\n    </div>\r\n\r\n    <div class=\"revieworder-table-container\">\r\n        <div class=\"row revieworder-header-container fixed-width-row\">\r\n            <div class=\"col-sm-1 py-2 count-width\">#</div>\r\n            <div class=\"col-sm-3 py-2\">ITEM</div>\r\n            <div class=\"col-sm-2 py-2\">JOB REFERENCE</div>\r\n            <div class=\"col-sm-2 py-2\">TOTAL QTY</div>\r\n            <div class=\"col-sm-2 py-2\">UNIT PRICE</div>\r\n            <div class=\"col-sm-2 py-2\">TOTAL PRICE</div>\r\n        </div>\r\n        <div class=\"row revieworder-body-container\" *ngFor=\"let cart of cartDetails;let i = index\">\r\n            <div class=\"col-sm-12\">\r\n                <div class=\"row fixed-width-row\">\r\n                    <div class=\"col-sm-1 count-width\">\r\n                        <span> 0{{i +1}}</span>\r\n                    </div>\r\n                    <div class=\"col-sm-3\">\r\n                        <div class=\"row py-3 product-image-container\">\r\n                            <div class=\"col-sm-4 p-md-0 col-lg-2\">\r\n                                <img [src]=\"getProductImage(cart)\" alt=\"product image\" class=\"product-img-width\">\r\n                                <!-- <cx-media [container]=\"getProductImage(cart)\" format=\"cartIcon\"\r\n                                role=\"presentation\"></cx-media> -->\r\n                            </div>\r\n                            <div class=\"col-sm-8 col-lg-10\">\r\n                                <p class=\" reviewproduct-name mb-2\">{{cart?.product?.name}}</p>\r\n                                <p class=\"sku-text\">SKU: {{cart?.product?.code }}</p>\r\n                            </div>\r\n                        </div>\r\n                        <ng-container *ngIf=\"cart?.product?.classifications\">\r\n                            <div class=\"row\">\r\n                                <div class=\"col-sm-12 pl-md-0 mb-2 attributes\">\r\n                                    <span *ngFor=\"let attributes of cart?.product &&  cart?.product?.classifications &&  cart?.product?.classifications[0] &&  cart?.product?.classifications[0]?.features;last as isLast\">\r\n                                        {{attributes?.featureValues[0]?.value }} <span *ngIf=\"!isLast\"> | </span>\r\n                                    </span>\r\n                                    mm\r\n                                </div>\r\n                            </div>\r\n                        </ng-container>\r\n                    </div>\r\n                    <div class=\"col-sm-2 py-3\">\r\n                        {{cart?.jobReference || '-'}}\r\n                    </div>\r\n                    <div class=\"col-sm-2 py-3\">{{cart.quantityDouble}} {{cart?.basePrice?.unitType}}</div>\r\n                    <div class=\"col-sm-2 py-3\">{{cart?.basePrice?.formattedValue}}/{{cart?.basePrice?.unitType}}</div>\r\n                    <div class=\"col-sm-2 py-3\">{{cart?.totalPrice?.formattedValue}}\r\n                        <span class=\"d-block\"> excl GST and freight</span>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n            <div class=\"col-sm-12 pl-md-0\">\r\n                <ng-container *ngIf=\"cart?.configurationInfos.length\">\r\n                    <p class=\"colors-paragraph mb-0\">\r\n                        <span class=\"revieworder-color mr-3\" [ngStyle]=\"{ background: cart?.configurationInfos[0]?.configurationValue.split('|') | slice:2}\"></span> {{cart?.configurationInfos[0]?.configurationValue.split('|') | slice:1:2}}\r\n                    </p>\r\n                    <p class=\"m-2\">\r\n                        <span *ngFor=\"let value of cart?.configurationInfos\">\r\n                            <span *ngIf=\"value.configurationLabel == 'TOTAL_WIDTH_RANGE'\"> Total Width Range: {{value?.configurationValue}} </span>\r\n                            <span *ngIf=\"value.configurationLabel == 'NBR_OF_BENDS'\"> | No. of Bends:{{value?.configurationValue}} </span>\r\n                        </span>\r\n                    </p>\r\n                    \r\n                    <div class=\"row\">\r\n                        <div class=\"col-sm-2\">\r\n                            <div class=\"row\">\r\n                                <div class=\"col-sm-6\" *ngFor=\"let data of cart?.configList; let i= index;\">\r\n                                    <div>\r\n                                        {{data?.configurationLabel}} :{{data?.configurationValue}}</div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"col-sm-10\" *ngIf=\"cart?.product?.flashingProduct\">\r\n                            <img class=\"img-fluid\" [src]=\"occeBaseUrl + cart?.attachments[0]?.downloadURL\" alt=\"product image\">\r\n                        </div>\r\n                    </div>\r\n                </ng-container>\r\n                <ng-container *ngIf=\"cart?.subLineConfigInfos?.length>0\">\r\n                    <div class=\"revieworder-collapse\">\r\n                        <div class=\"row\">\r\n                            <div class=\"col-sm-6 bundle-details\">\r\n                                <div class=\"row bundle-details-header\">\r\n                                    <div class=\"col-3\">Quantity</div>\r\n                                    <div class=\"col-3\">Length (LM)</div>\r\n                                    <ng-container *ngIf=\"cart?.subLineConfigInfos[i]?.bundleName\">\r\n                                        <div class=\"col-3\">Bundle</div>\r\n                                        <div class=\"col-3\">Reference</div>\r\n                                    </ng-container>\r\n                                </div>\r\n                                <div class=\"row\" *ngFor=\"let subLine of cart?.subLineConfigInfos\">\r\n                                    <div class=\"col-3\">{{subLine?.quantity}}</div>\r\n                                    <div class=\"col-3\">{{subLine?.length | number:'0.3-3'}}</div>\r\n                                    <ng-container *ngIf=\"cart?.subLineConfigInfos[i]?.bundleName\">\r\n                                        <div class=\"col-3\">{{subLine?.bundleName}}</div>\r\n                                        <div class=\"col-3\">{{subLine?.reference}}</div>\r\n                                    </ng-container>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </ng-container>\r\n            </div>\r\n            <ng-container *ngIf=\"cart?.product?.flashingProduct && cart?.productConfiguredInfos && cart?.productConfiguredInfos?.length>0\">\r\n                <div class=\"flashing-block col-sm-12\" *ngFor=\"let data of cart?.productConfiguredInfos\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-sm-3\">\r\n                            <h3 class=\"flash-title\">{{ data?.product?.name }}</h3>\r\n                            <h6 class=\"skuId\">SKU: {{ data?.product?.code }}</h6>\r\n                            <span *ngIf=\"data?.girth\">Grith: +{{data?.girth}}mm </span>\r\n                        </div>\r\n                        <div class=\"offset-sm-3 col-sm-2\">\r\n                            {{data?.quantityDouble}}{{data?.unitType}}\r\n                        </div>\r\n                        <div class=\"col-sm-2\">\r\n                            {{data?.basePrice?.formattedValue}}/{{data?.unitType}}\r\n                        </div>\r\n                        <div class=\"col-sm-2\">\r\n                            {{data?.totalPrice?.formattedValue}}\r\n                            <span class=\"gst-text\">excl GST</span>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </ng-container>\r\n        </div>\r\n        <div class=\"row d-flex mt-3\">\r\n            <div class=\"col-md-12\">\r\n                <p class=\"mb-0 review-total-text text-right\">Total</p>\r\n                <p class=\"review-total-value mb-2 text-right\">{{orderDetails?.totalPrice?.formattedValue}} </p>\r\n                <p><span class=\"d-block excltext text-right\"> Excluding GST, freight and sundry charges</span></p>\r\n            </div>\r\n        </div>\r\n\r\n    </div>\r\n\r\n    <div class=\"row fixed-width-row\" *ngIf=\"orderMessage && !isOrder\">\r\n        <div class=\"col-sm-12 pl-0 order-print-bottom\">\r\n            <div class=\"text-left\" [innerHTML]=\"orderMessage\"></div>\r\n        </div>\r\n    </div>\r\n\r\n</div>\r\n", styles: ["@charset \"UTF-8\";@media screen and (min-width: 1366px){:root{--fontsize12: .75rem;--fontsize14: .875rem;--fontsize16: 1rem;--fontsize17: 1.063rem;--fontsize17-5: 1.1rem;--fontsize18: 1.125rem;--fontsize18-4: 1.5rem;--fontsize20: 1.25rem;--fontsize21: 1.313rem;--fontsize22: 1.375rem;--fontsize23: 1.438rem;--fontsize24: 1.5rem;--fontsize26: 1.625rem;--fontsize28: 1.75rem;--fontsize30: 1.625rem;--fontsize32: 2rem;--fontsize34: 2.125rem;--fontsize36: 2rem;--fontsize40: 2.25rem;--fontsize46: 2.875rem;--fontsize80: 5rem}}@media screen and (max-width: 1365px) and (min-width: 768px){:root{--fontsize12: .75rem;--fontsize14: .875rem;--fontsize16: 1rem;--fontsize17: .9rem;--fontsize17-5: 1rem;--fontsize18: .875rem;--fontsize20: 1rem;--fontsize21: 1.063rem;--fontsize22: 1.125rem;--fontsize23: 1.188rem;--fontsize24: 1rem;--fontsize28: 1.5rem;--fontsize30: 1.25rem;--fontsize32: 1.75rem;--fontsize34: 1.875rem;--fontsize36: 1.625rem;--fontsize40: 2.5rem;--fontsize46: 2.875rem;--fontsize80: 3.5rem}}@media screen and (max-width: 767px){:root{--fontsize12: .75rem;--fontsize14: .875rem;--fontsize16: 1rem;--fontsize16-5: .77rem;--fontsize17: .9rem;--fontsize17-5: 1rem;--fontsize18: .875rem;--fontsize19: .938rem;--fontsize20: 1rem;--fontsize21: 1.063rem;--fontsize22: 1.125rem;--fontsize23: 1.188rem;--fontsize24: 1rem;--fontsize26: 1.25rem;--fontsize28: 1.5rem;--fontsize30: 1.25rem;--fontsize32: 1.75rem;--fontsize34: 1.875rem;--fontsize36: 1.625rem;--fontsize40: 2.5rem;--fontsize46: 2rem;--fontsize80: 2.5rem}}@font-face{font-family:icomoon;font-weight:400;src:url(../assets/fonts/icomoon.ttf) format(\"ttf\"),url(../assets/fonts/icomoon.woff) format(\"woff\");font-weight:normal;font-style:normal;font-display:swap}@font-face{font-family:\"Arial Regular\";src:url(../assets/fonts/arial-webfont.woff) format(\"woff\"),url(../assets/fonts/arial-webfont.woff2) format(\"woff2\");font-weight:normal;font-style:normal}@font-face{font-family:\"Arial Bold\";src:url(../assets/fonts/arialbold-webfont.woff) format(\"woff\"),url(../assets/fonts/arialbold-webfont.woff2) format(\"woff2\");font-weight:normal;font-style:normal}@font-face{font-family:\"Arial Black\";src:url(../assets/fonts/arialblack-webfont.woff) format(\"woff\"),url(../assets/fonts/arialblack-webfont.woff2) format(\"woff2\");font-weight:normal;font-style:normal}@font-face{font-family:\"Helvetica Neue Reqular\";src:url(../assets/fonts/helveticaneue.woff) format(\"woff\"),url(../assets/fonts/helveticaneue.woff2) format(\"woff2\");font-weight:normal;font-style:normal}@font-face{font-family:\"Helvetica Neue Thin\";src:url(../assets/fonts/helveticaneuethin-webfont.woff) format(\"woff\"),url(../assets/fonts/helveticaneuethin-webfont.woff2) format(\"woff2\");font-weight:normal;font-style:normal}@font-face{font-family:\"Helvetica Neue Medium\";src:url(../assets/fonts/helveticaneuemedium-webfont.woff) format(\"woff\"),url(../assets/fonts/helveticaneuemedium-webfont.woff2) format(\"woff2\");font-weight:normal;font-style:normal}[class*=\" icon-\"],[class^=icon-]{font-family:icomoon!important;font-feature-settings:normal;font-variant:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-style:normal;font-weight:400;line-height:1;text-transform:none;font-display:swap}.icon-right:before{content:\"\\e902\"}.icon-materials:before{content:\"\\e900\"}.icon-natural-lighting:before{content:\"\\e90a\"}.icon-rainwater:before{content:\"\\e901\"}.icon-roofing:before{content:\"\\e90b\"}.icon-flashing{position:relative;display:inline-block;height:32px;text-align:center;width:32px}.icon-flashing:before,.mainnav-link-level-2.show .navTagChild .icon-flashing:before{content:url(../assets/images/icon-flashing-white.svg);height:20px;width:20px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);line-height:15px}li.megamenuSubChild:hover .icon-flashing:before{content:url(../assets/images/icon-flashing-black.svg)}.icon-structural:before{content:\"\\e90c\"}.icon-accessories-old .path1:before{content:\"\\e903\"}.icon-accessories-old .path2:before{margin-left:-1em;content:\"\\e904\"}.icon-accessories-old .path3:before{margin-left:-1em;content:\"\\e905\"}.icon-cladding-old .path1:before{content:\"\\e90d\"}.icon-cladding-old .path2:before{margin-left:-1em;content:\"\\e90e\"}.icon-close:before{content:\"\\e90f\"}.icon-message:before{content:\"\\e910\"}.icon-search .path1:before{content:\"\\e906\"}.icon-search .path2:before{content:\"\\e907\"}.icon-search .path3:before{margin-left:-1.0156em;content:\"\\e908\"}.icon-summary:before{content:\"\\e911\"}.icon-branch:before{content:\"\\e912\"}.icon-delivery:before{content:\"\\e913\"}.icon-downloads:before{content:\"\\e909\"}.icon-drawings:before{content:\"\\e914\"}.icon-full:before{content:\"\\e915\"}.icon-manual:before{content:\"\\e916\"}.icon-payment:before{content:\"\\e917\"}.icon-empty .path1:before{content:\"\\e918\"}.icon-empty .path2:before{margin-left:-1em;content:\"\\e919\"}.icon-empty .path3:before{margin-left:-1em;content:\"\\e91a\"}.icon-product-overview:before{content:\"\\e91b\"}.icon-arrows:before{content:\"\\e91c\"}.icon-selected:before{content:\"\\e91d\"}.icon-accessories:before{content:\"\\e91b\"}.icon-cladding:before{content:\"\\e91e\"}.icon-Triangle:before{content:\"\\e91f\"}.icon-home:before{content:\"\\e920\"}.icon-faq:before{content:\"\\e921\"}.icon-temperature:before{content:\"\\e922\"}body header{font-family:\"Arial Regular\",sans-serif}header{background-color:#1d1d1b;position:sticky;top:0;background-size:100% 25%!important;background-repeat:no-repeat;z-index:10}header .header{max-width:100%;padding:0}header cx-banner cx-media img{margin-top:.7rem;margin-bottom:0}header label{display:inline-flex}header .SiteLinks{height:52px;display:flex;align-items:center;justify-content:space-between;padding-top:5px;padding-bottom:5px}header .SiteLinks cx-paragraph p{color:#fff;font-size:var(--fontsize16);line-height:var(--fontsize16);margin-bottom:0}header .SiteLinks cx-paragraph{font-size:var(--fontsize16)}header .SiteLinks app-account-dropdown,header .SiteLinks app-find-store{width:calc(25% - 25px);max-width:328px;margin-right:25px}header .SiteLinks app-contact-us{width:calc(20% - 25px);max-width:100px;margin-left:auto}header .SiteLinks app-custom-mini-cart{width:10%}header .SiteLinks .preferenceLink{margin-left:auto}header .SiteLinks .preferenceLink cx-generic-link{margin:0}header .SiteLinks .preferenceLink cx-generic-link cx-media img{height:22px;margin:0}header .SiteLogo .storeLogo{position:absolute;z-index:99;left:40px;bottom:10px}header .SiteLogo .homeLogo{max-width:28px;height:28px;position:absolute;z-index:99;bottom:47px}header .NavigationBar{flex:70%;background-color:#b61828;min-height:40px;display:flex;align-items:center;position:relative;z-index:10}header .logoutMenu{margin-top:0!important}header .logoutMenu li{cursor:pointer;background-color:#4c4c4c;color:#fff}header .logoutMenu li:hover{text-decoration:underline;background-color:#4c4c4c}header .MarketingContext{width:100%;margin:auto}.customer-service-icon{cursor:pointer}d .helpSupport{width:20rem;border:0;margin-top:.5rem!important;transform:translate(-42%,36px)!important;padding:1rem 1rem 0;background-color:#393939;color:#fff;top:0}d .helpSupport .arrow-up{position:absolute;top:-8px;right:44%;width:0;height:0;border-left:15px solid rgba(0,0,0,0);border-right:15px solid rgba(0,0,0,0);border-bottom:15px solid #393939}d .helpSupport .contact-us-info .heading{font-family:\"Arial Bold\",sans-serif}d .helpSupport .contact-us-info .detail{font-size:var(--fontsize14);line-height:2rem}d .helpSupport .contact-us-info .detail .service-icon{height:20px;width:20px;margin-right:10px}d .helpSupport .contact-us-info .contactLink a{font-size:var(--fontsize14);text-decoration:underline;text-transform:uppercase}d .helpSupport .contact-us-info a{color:#fff;text-decoration:none}d .helpSupport .contact-us-info a:hover{text-decoration:underline}.pageTitle{font-family:\"Helvetica Neue Regular\",sans-serif;font-size:var(--fontsize54)}@media screen and (max-width: 991px){cx-storefront header{background-color:#b61828}cx-storefront header cx-banner cx-media img{margin:auto}cx-storefront header .SiteLogo{width:100%;max-width:211px;margin:auto;padding-left:30px;box-sizing:border-box}cx-storefront header .SiteLogo .storeLogo{position:unset}cx-storefront header .SearchBox{margin:14px 0 10px;width:30px}cx-storefront header .SiteLinks{background-color:transparent;width:110px;margin:auto 25px auto 0}cx-storefront header .SiteLinks app-account-dropdown,cx-storefront header .SiteLinks app-find-store,cx-storefront header .SiteLinks app-contact-us,cx-storefront header .SiteLinks cx-paragraph,cx-storefront header .SiteLinks .preferenceLink{display:none}cx-storefront header .SiteLinks app-custom-mini-cart,cx-storefront header .SiteLinks app-custom-user-account{width:35px}cx-storefront header.is-expanded{overflow-y:auto;position:fixed;bottom:0;top:0;width:calc(100% - 99px)}cx-storefront header.is-expanded .header{background-color:#b61828;margin-left:0}cx-storefront header.is-expanded .PreHeader{position:absolute;right:15px;top:15px}cx-storefront header.is-expanded .SearchBox{display:none}cx-storefront header.is-expanded .SiteLogo{position:absolute;top:25px;z-index:9}cx-storefront header.is-expanded .SiteLinks{background-color:#1d1d1b;width:100%;margin:15px auto 15px 0;height:unset;padding:15px;max-width:100%;position:relative;z-index:9;top:60px}cx-storefront header.is-expanded .SiteLinks app-account-dropdown,cx-storefront header.is-expanded .SiteLinks app-find-store,cx-storefront header.is-expanded .SiteLinks app-contact-us,cx-storefront header.is-expanded .SiteLinks cx-paragraph,cx-storefront header.is-expanded .SiteLinks .preferenceLink{display:block}cx-storefront header.is-expanded .SiteLinks app-custom-mini-cart,cx-storefront header.is-expanded .SiteLinks app-custom-user-account{display:none}cx-storefront header.is-expanded .SiteLinks app-account-dropdown{width:100%;max-width:100%}cx-storefront header.is-expanded .SiteLinks app-find-store{width:50%;max-width:328px;min-width:328px}cx-storefront header.is-expanded .SiteLinks app-contact-us{margin-right:15px;margin-left:auto;width:115px;max-width:unset}cx-storefront header.is-expanded .navigation{position:relative;top:45px}cx-storefront header.is-expanded:before{background-color:#0000004d;right:0;content:\"\";position:fixed;z-index:2;top:0;bottom:0;height:100vh;width:99px}cx-storefront header.is-expanded:after{background-color:transparent}}@media screen and (max-width: 576px){cx-storefront header .SiteLogo{max-width:80px}cx-storefront header .SiteLogo .storeLogo{display:none}cx-storefront header .searchBox{height:45px}cx-storefront header.is-expanded{width:100%}cx-storefront header.is-expanded .header,cx-storefront header.is-expanded .navigation{width:100%}cx-storefront header.is-expanded .SiteLogo{max-width:211px!important}cx-storefront header.is-expanded .SiteLogo .storeLogo{display:block}cx-storefront header.is-expanded .SiteLinks{max-width:100%;width:100%}cx-storefront header.is-expanded .SiteLinks app-account-dropdown,cx-storefront header.is-expanded .SiteLinks app-find-store,cx-storefront header.is-expanded .SiteLinks app-contact-us,cx-storefront header.is-expanded .SiteLinks cx-paragraph,cx-storefront header.is-expanded .SiteLinks .preferenceLink{display:block}cx-storefront header.is-expanded .SiteLinks app-custom-mini-cart,cx-storefront header.is-expanded .SiteLinks app-custom-user-account{display:none}cx-storefront header.is-expanded .SiteLinks app-find-store{width:100%;max-width:100%;margin-bottom:10px}cx-storefront header.is-expanded .SiteLinks app-contact-us{margin-left:0}cx-storefront header.is-expanded .SiteLinks cx-paragraph{margin-left:auto}cx-storefront header.is-expanded:before{display:none}}#visualization-container{text-align:center;margin:0 auto}#cds-viewer-container-3d{width:320px;height:200px}#cds-viewer-container-2d{width:320px;height:200px}[aria-label=Close]{cursor:pointer}cx-media.is-missing{background:url(./assets/images/search-noimage.svg);background-size:cover;background-position:center;background-repeat:no-repeat}.hide{display:none!important}.show{display:block}.customBtn{padding:8px 60px}.printedContainer{width:1200px;max-width:1200px;padding:32px}.fixed-width-row{flex-wrap:nowrap}.revieworder-table-container{padding-bottom:3rem}.revieworder-table-container .revieworder-header-container{background:#646363;color:#fff;font-family:\"Arial Bold\",sans-serif}.revieworder-table-container .revieworder-header-container .count-width{max-width:4%}.revieworder-table-container .review-total-text{font-size:var(--fontsize24);font-family:\"Arial Bold\",sans-serif}.revieworder-table-container .review-total-value{font-size:var(--fontsize40);font-family:\"Arial Bold\",sans-serif}.revieworder-table-container .excltext{font-size:var(--fontsize16);color:#6f6f6f}.revieworder-table-container .revieworder-body-container{border-bottom:1px solid #E0E0E0;padding-bottom:1rem}.revieworder-table-container .revieworder-body-container .count-width{top:15px;max-width:4%;position:relative}.revieworder-table-container .revieworder-body-container .attributes{position:relative;top:-8px}.revieworder-table-container .revieworder-body-container .product-image-container{display:flex}.revieworder-table-container .revieworder-body-container .product-image-container .product-img-width{width:60px;max-width:60px}.revieworder-table-container .revieworder-body-container .product-image-container .reviewproduct-image{width:71px;height:71px}.revieworder-table-container .revieworder-body-container .product-image-container .reviewproduct-name{font-family:\"Arial Bold\",sans-serif}.revieworder-table-container .revieworder-body-container .product-image-container .sku-text{font-size:var(--fontsize14);font-family:\"Arial Bold\",sans-serif;color:#6f6f6f}.revieworder-table-container .revieworder-body-container .seemoredetails-link{font-size:var(--fontsize16);font-family:\"Arial Regular\",sans-serif;text-decoration:underline;cursor:pointer}.revieworder-table-container .revieworder-body-container .seemoredetails-link:hover{color:#b61828}.revieworder-table-container .revieworder-body-container .revieworder-collapse{padding:8px}.revieworder-table-container .revieworder-body-container .revieworder-collapse .bundle-details{width:600px;padding:1rem;line-height:2.5rem}.revieworder-table-container .revieworder-body-container .revieworder-collapse .bundle-details .bundle-details-header{font-family:\"Arial Bold\",sans-serif}.revieworder-table-container .colors-paragraph{display:flex;align-items:center;padding-left:8px}.revieworder-table-container .colors-paragraph .revieworder-color{width:20px;height:20px;border:1px solid #000000;display:inline-flex}.delivery_logo{padding:10px;width:100%;margin:0 0 30px}.boxMargin{margin:16px 0}.boxMargin .deliveryInfoBx{padding:1.5rem;box-sizing:border-box}.boxMargin .deliveryInfoBx .align-notes{margin-top:-10px}.boxMargin .deliveryInfoBx:nth-child(2),.boxMargin .deliveryInfoBx:nth-child(3){border-left:0}.boxMargin .deliveryInfo .Childbox{height:100px}.boxMargin .deliveryInfo .firstChild{padding-bottom:20px}.boxMargin .deliveryInfo .pickupdelivery-image{padding:8px;border:1px solid #A6A6A5;border-radius:10px}.boxMargin .deliveryInfo .order-heading{color:#b61828;font-size:28px}.boxMargin .deliveryInfo label{font-family:\"Arial Bold\",sans-serif;display:inline-block;color:#1d1d1b}.boxMargin .deliveryInfo li{display:flex;line-height:24px;padding:3px 0}.boxMargin .deliveryInfo li label{width:40%;font-family:\"Arial Bold\",sans-serif;display:inline-block;font-size:large;color:#1d1d1b}.boxMargin .deliveryInfo li .infoValue{width:60%;display:inline-block}.boxMargin .deliveryInfo li .infoValue a{text-decoration:underline;color:#b61828}.order-print-bottom{padding:2rem;border-top:1px solid #1D1D1B}.flashing-block{background-color:#e8e8e8;padding:12px;border-bottom:1px solid #C6C6C6;margin-right:-15px;margin-left:-15px}.flashing-block .flash-title{font-size:var(--fontsize16);font-family:\"Arial Bold\",sans-serif}.flashing-block .skuId{color:#707070;font-size:var(--fontsize14);font-family:\"Arial Bold\",sans-serif}.flashing-block .gst-text{display:block;font-size:var(--fontsize16);font-family:\"Arial Regular\",sans-serif}\n"], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4.AsyncPipe, "date": i4.DatePipe, "slice": i4.SlicePipe, "number": i4.DecimalPipe } });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedDownloadOrderComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'app-shared-download-order',
                    templateUrl: './shared-download-order.component.html',
                    styleUrls: ['./shared-download-order.component.scss'],
                }]
        }], ctorParameters: function () { return [{ type: i1.CmsService }, { type: i0.ChangeDetectorRef }, { type: i2.OrderFacade }, { type: i3.CartService }]; }, propDecorators: { orderDetailsView: [{
                type: Input
            }], cartDetailsView: [{
                type: Input
            }], isOrder: [{
                type: Input
            }], downLoadPdf: [{
                type: ViewChild,
                args: ['downLoadPDF']
            }] } });
//# sourceMappingURL=data:application/json;base64, 