import { Component, Input, ViewChild } from '@angular/core';
import { DEPRECATED_CONFIG } from '@seniorsistemas/angular-components/common/deprecated-selector';
import { DeprecatedSelectorDirective } from '@seniorsistemas/angular-components/common/deprecated-selector';
import * as i0 from "@angular/core";
import * as i1 from "@seniorsistemas/angular-components/common/deprecated-selector";
/**
 * @description Componente de barra superior (topbar) com título e suporte a
 * conteúdo transclusão. Também responde ao seletor legado `s-product-header`.
 *
 * @example
 * ```html
 * <s-topbar header="Minha Aplicação">
 *   <!-- ações e menus -->
 * </s-topbar>
 * ```
 *
 * @category Structure
 */
export class TopbarComponent {
    static nextIdSeed = 0;
    static _nextId = TopbarComponent.nextIdSeed;
    static getNextId() {
        return this._nextId++;
    }
    /** @description Identificador único do componente no DOM. Gerado automaticamente se não informado. */
    id = `s-topbar-${TopbarComponent.getNextId()}`;
    /** @description Título exibido na barra superior. Campo obrigatório. */
    header;
    /** @description Z-index base aplicado ao componente. @default 0 */
    baseZIndex = 0;
    /** @description Quando `true`, aplica borda inferior; quando `false`, aplica borda superior. @default true */
    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: TopbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: TopbarComponent, selector: "s-topbar, s-product-header", inputs: { id: "id", header: "header", baseZIndex: "baseZIndex", isHeaderFrame: "isHeaderFrame" }, providers: [
            {
                provide: DEPRECATED_CONFIG,
                useValue: {
                    oldSelector: 's-product-header',
                    newSelector: 's-topbar',
                    removalVersion: '20.0.0',
                },
            },
        ], viewQueries: [{ propertyName: "container", first: true, predicate: ["headerContainer"], descendants: true }], hostDirectives: [{ directive: i1.DeprecatedSelectorDirective }], 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:#595959;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:#595959;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: TopbarComponent, decorators: [{
            type: Component,
            args: [{ selector: 's-topbar, s-product-header', hostDirectives: [DeprecatedSelectorDirective], providers: [
                        {
                            provide: DEPRECATED_CONFIG,
                            useValue: {
                                oldSelector: 's-product-header',
                                newSelector: 's-topbar',
                                removalVersion: '20.0.0',
                            },
                        },
                    ], 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:#595959;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:#595959;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, 