import { Component, HostListener, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
export class PopoverComponent {
    constructor() {
        this.message = '';
        this.data = {};
        this.position = 'left';
        this.active = false;
    }
    onClick($event) {
        $event.stopPropagation();
        this.active = true;
    }
}
PopoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
PopoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PopoverComponent, selector: "he-popover", inputs: { message: "message", content: "content", data: "data", position: "position" }, host: { listeners: { "click": "onClick($event)" } }, ngImport: i0, template: "<div class=\"is-inline-block popover is-popover-{{position}}\" [class.is-popover-active]=\"active\">\n  <ng-content></ng-content>\n\n  <div class=\"popover-content\">\n\n    <ng-template\n      [ngTemplateOutlet]=\"content || ct\"\n      [ngTemplateOutletContext]=\"{message: message, data: data}\"\n    ></ng-template>\n\n    <footer>\n      <ng-content select=\"[actions]\"></ng-content>\n      <button class=\"button is-small\" (click)=\"$event.stopPropagation(); active = false\">\n        <span>Close</span>\n      </button>\n    </footer>\n  </div>\n</div>\n\n<ng-template #ct>\n  <p class=\"mb-2 is-pre-wrap\" [innerHtml]=\"message\"></p>\n</ng-template>\n", styles: [":host{cursor:pointer;display:block}.popover{position:relative;display:inline-block}.popover .popover-content{z-index:99999;position:absolute;display:none;font-size:.75rem;padding:.4rem .8rem;color:#4a4a4a;background-color:#fff;border-radius:4px;box-shadow:0 2px 3px #0a0a0a1a,0 0 0 1px #0a0a0a1a;width:max-content;max-width:24rem}.popover .popover-content:before{position:absolute;content:\"\";border-style:solid;pointer-events:none;height:0;width:0;top:100%;left:50%;border-color:transparent;border-bottom-color:#fff;border-left-color:#fff;border-width:.4rem;margin-left:-.4rem;margin-top:-.4rem;transform-origin:center;box-shadow:-1px 1px 2px #0a0a0a33}.popover .popover-content{top:auto!important;bottom:100%!important;left:50%!important;right:auto!important;transform:translate(-50%,-.7rem)!important}.popover .popover-content:before{top:100%!important;bottom:auto!important;left:50%!important;right:auto!important;transform:rotate(-45deg)}.popover.is-popover-right .popover-content{top:auto!important;bottom:50%!important;left:100%!important;right:auto!important;transform:translate(.7rem,50%)!important}.popover.is-popover-right .popover-content:before{top:50%!important;bottom:auto!important;left:0!important;right:auto!important;transform:rotate(45deg)}.popover.is-popover-bottom .popover-content{top:100%!important;bottom:auto!important;left:50%!important;right:auto!important;transform:translate(-50%,.7rem)!important}.popover.is-popover-bottom .popover-content:before{top:0!important;bottom:auto!important;left:50%!important;right:auto!important;transform:rotate(135deg)}.popover.is-popover-left .popover-content{top:auto!important;bottom:50%!important;left:auto!important;right:100%!important;transform:translate(-.7rem,50%)!important}.popover.is-popover-left .popover-content:before{top:50%!important;bottom:auto!important;left:100%!important;right:auto!important;transform:rotate(-135deg)}.popover.is-popover-active .popover-content,.popover.is-popover-hover:hover .popover-content,.popover .popover-trigger:focus~.popover-content{display:block}\n"], directives: [{ type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PopoverComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'he-popover',
                    templateUrl: './popover.component.html',
                    styleUrls: ['./popover.component.scss']
                }]
        }], propDecorators: { message: [{
                type: Input
            }], content: [{
                type: Input
            }], data: [{
                type: Input
            }], position: [{
                type: Input
            }], onClick: [{
                type: HostListener,
                args: ['click', ['$event']]
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9wb3Zlci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY29tbW9uL3BvcG92ZXIvcG9wb3Zlci5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8u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