import { Component, Input, ViewChild } from '@angular/core';
import * as i0 from "@angular/core";
export class ProductHeaderComponent {
    static nextIdSeed = 0;
    static _nextId = ProductHeaderComponent.nextIdSeed;
    static getNextId() {
        return this._nextId++;
    }
    id = `s-product-header-${ProductHeaderComponent.getNextId()}`;
    header;
    baseZIndex = 0;
    isHeaderFrame = true;
    container = null;
    ngAfterViewInit() {
        if (!this.container) {
            return;
        }
        if (this.isHeaderFrame) {
            this.container.nativeElement.style.borderBottom = '1px solid #ddd';
        }
        else {
            this.container.nativeElement.style.borderTop = '1px solid #ddd';
        }
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductHeaderComponent, selector: "s-product-header", inputs: { id: "id", header: "header", baseZIndex: "baseZIndex", isHeaderFrame: "isHeaderFrame" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["headerContainer"], descendants: true }], ngImport: i0, template: "<div [id]=\"id\" class=\"box\">\n    <div\n      #headerContainer\n      class=\"sds-container\"\n      [class]=\"isHeaderFrame ? 'header-frame' : 'primary-header'\"\n    >\n      <h1 [class]=\"isHeaderFrame ? 'title' : 'primary-title'\">{{ header }}</h1>\n      <div class=\"content\">\n        <ng-content></ng-content>\n      </div>\n    </div>\n  </div>\n", styles: [".box{position:relative;width:100%;height:70px}.header-frame{padding-top:15px;padding-bottom:15px;width:100%;top:0;left:0;height:70px;background-color:#fff;display:flex;justify-content:space-between;align-items:center;position:fixed;z-index:32}.title{color:#999;font-weight:400;font-size:16pt;margin-right:15px;min-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content{display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.primary-header{display:flex;width:100%;height:70px;padding:15px 20px;justify-content:space-between;align-items:center;border-bottom:1px solid #ddd;background-color:#fff;gap:24px}@media (max-width: 768px){.primary-header{width:100%}}.primary-header .primary-title{color:#999;font-weight:400;font-size:16pt;margin-right:15px;min-width:140px;overflow:hidden;text-overflow:ellipsis}\n"] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductHeaderComponent, decorators: [{
            type: Component,
            args: [{ selector: 's-product-header', template: "<div [id]=\"id\" class=\"box\">\n    <div\n      #headerContainer\n      class=\"sds-container\"\n      [class]=\"isHeaderFrame ? 'header-frame' : 'primary-header'\"\n    >\n      <h1 [class]=\"isHeaderFrame ? 'title' : 'primary-title'\">{{ header }}</h1>\n      <div class=\"content\">\n        <ng-content></ng-content>\n      </div>\n    </div>\n  </div>\n", styles: [".box{position:relative;width:100%;height:70px}.header-frame{padding-top:15px;padding-bottom:15px;width:100%;top:0;left:0;height:70px;background-color:#fff;display:flex;justify-content:space-between;align-items:center;position:fixed;z-index:32}.title{color:#999;font-weight:400;font-size:16pt;margin-right:15px;min-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content{display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.primary-header{display:flex;width:100%;height:70px;padding:15px 20px;justify-content:space-between;align-items:center;border-bottom:1px solid #ddd;background-color:#fff;gap:24px}@media (max-width: 768px){.primary-header{width:100%}}.primary-header .primary-title{color:#999;font-weight:400;font-size:16pt;margin-right:15px;min-width:140px;overflow:hidden;text-overflow:ellipsis}\n"] }]
        }], propDecorators: { id: [{
                type: Input
            }], header: [{
                type: Input,
                args: [{ required: true }]
            }], baseZIndex: [{
                type: Input
            }], isHeaderFrame: [{
                type: Input
            }], container: [{
                type: ViewChild,
                args: ['headerContainer', { static: false }]
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1oZWFkZXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc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29tcG9uZW50Lm5leHRJZFNlZWQ7XG5cbiAgICBwdWJsaWMgc3RhdGljIGdldE5leHRJZCgpOiBudW1iZXIge1xuICAgICAgICByZXR1cm4gdGhpcy5fbmV4dElkKys7XG4gICAgfVxuXG4gICAgQElucHV0KClcbiAgICBwdWJsaWMgaWQgPSBgcy1wcm9kdWN0LWhlYWRlci0ke1Byb2R1Y3RIZWFkZXJDb21wb25lbnQuZ2V0TmV4dElkKCl9YDtcblxuICAgIEBJbnB1dCh7IHJlcXVpcmVkOiB0cnVlIH0pXG4gICAgcHVibGljIGhlYWRlciE6IHN0cmluZztcblxuICAgIEBJbnB1dCgpXG4gICAgcHVibGljIGJhc2VaSW5kZXggPSAwO1xuXG4gICAgQElucHV0KClcbiAgICBwdWJsaWMgaXNIZWFkZXJGcmFtZSA9IHRydWU7XG5cbiAgICBAVmlld0NoaWxkKCdoZWFkZXJDb250YWluZXInLCB7IHN0YXRpYzogZmFsc2UgfSlcbiAgICBwdWJsaWMgY29udGFpbmVyOiBFbGVtZW50UmVmIHwgbnVsbCA9IG51bGw7XG5cbiAgICBwdWJsaWMgbmdBZnRlclZpZXdJbml0KCk6IHZvaWQge1xuICAgICAgICBpZiAoIXRoaXMuY29udGFpbmVyKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodGhpcy5pc0hlYWRlckZyYW1lKSB7XG4gICAgICAgICAgICB0aGlzLmNvbnRhaW5lci5uYXRpdmVFbGVtZW50LnN0eWxlLmJvcmRlckJvdHRvbSA9ICcxcHggc29saWQgI2RkZCc7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aGlzLmNvbnRhaW5lci5uYXRpdmVFbGVtZW50LnN0eWxlLmJvcmRlclRvcCA9ICcxcHggc29saWQgI2RkZCc7XG4gICAgICAgIH1cbiAgICB9XG59XG4iLCI8ZGl2IFtpZF09XCJpZFwiIGNsYXNzPVwiYm94XCI+XG4gICAgPGRpdlxuICAgIC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