/**
 * @license
 * Copyright Alibaba.com All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
 */
import { ChangeDetectionStrategy, Component, Directive, Input } from '@angular/core';
import * as i0 from "@angular/core";
const _c0 = ["nzType", "button"];
const _c1 = ["nzType", "avatar"];
const _c2 = ["nzType", "input"];
export class NzSkeletonElementDirective {
    constructor() {
        this.nzActive = false;
    }
}
/** @nocollapse */ NzSkeletonElementDirective.ɵfac = function NzSkeletonElementDirective_Factory(t) { return new (t || NzSkeletonElementDirective)(); };
/** @nocollapse */ NzSkeletonElementDirective.ɵdir = i0.ɵɵdefineDirective({ type: NzSkeletonElementDirective, selectors: [["nz-skeleton-element"]], hostVars: 6, hostBindings: function NzSkeletonElementDirective_HostBindings(rf, ctx) { if (rf & 2) {
        i0.ɵɵclassProp("ant-skeleton", true)("ant-skeleton-element", true)("ant-skeleton-active", ctx.nzActive);
    } }, inputs: { nzActive: "nzActive", nzType: "nzType" } });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(NzSkeletonElementDirective, [{
        type: Directive,
        args: [{
                selector: 'nz-skeleton-element',
                host: {
                    '[class.ant-skeleton]': 'true',
                    '[class.ant-skeleton-element]': 'true',
                    '[class.ant-skeleton-active]': 'nzActive'
                }
            }]
    }], null, { nzActive: [{
            type: Input
        }], nzType: [{
            type: Input
        }] }); })();
export class NzSkeletonElementButtonComponent {
}
/** @nocollapse */ NzSkeletonElementButtonComponent.ɵfac = function NzSkeletonElementButtonComponent_Factory(t) { return new (t || NzSkeletonElementButtonComponent)(); };
/** @nocollapse */ NzSkeletonElementButtonComponent.ɵcmp = i0.ɵɵdefineComponent({ type: NzSkeletonElementButtonComponent, selectors: [["nz-skeleton-element", "nzType", "button"]], inputs: { nzShape: "nzShape", nzSize: "nzSize" }, attrs: _c0, decls: 1, vars: 10, template: function NzSkeletonElementButtonComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelement(0, "span");
    } if (rf & 2) {
        i0.ɵɵclassProp("ant-skeleton-button", true)("ant-skeleton-button-round", ctx.nzShape === "round")("ant-skeleton-button-circle", ctx.nzShape === "circle")("ant-skeleton-button-lg", ctx.nzSize === "large")("ant-skeleton-button-sm", ctx.nzSize === "small");
    } }, encapsulation: 2, changeDetection: 0 });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(NzSkeletonElementButtonComponent, [{
        type: Component,
        args: [{
                changeDetection: ChangeDetectionStrategy.OnPush,
                selector: 'nz-skeleton-element[nzType="button"]',
                template: `
    <span
      [class.ant-skeleton-button]="true"
      [class.ant-skeleton-button-round]="nzShape === 'round'"
      [class.ant-skeleton-button-circle]="nzShape === 'circle'"
      [class.ant-skeleton-button-lg]="nzSize === 'large'"
      [class.ant-skeleton-button-sm]="nzSize === 'small'"
    >
    </span>
  `
            }]
    }], null, { nzShape: [{
            type: Input
        }], nzSize: [{
            type: Input
        }] }); })();
export class NzSkeletonElementAvatarComponent {
    constructor() {
        this.styleMap = {};
    }
    ngOnChanges(changes) {
        if (changes.nzSize && typeof this.nzSize === 'number') {
            const sideLength = `${this.nzSize}px`;
            this.styleMap = { width: sideLength, height: sideLength, 'line-height': sideLength };
        }
        else {
            this.styleMap = {};
        }
    }
}
/** @nocollapse */ NzSkeletonElementAvatarComponent.ɵfac = function NzSkeletonElementAvatarComponent_Factory(t) { return new (t || NzSkeletonElementAvatarComponent)(); };
/** @nocollapse */ NzSkeletonElementAvatarComponent.ɵcmp = i0.ɵɵdefineComponent({ type: NzSkeletonElementAvatarComponent, selectors: [["nz-skeleton-element", "nzType", "avatar"]], inputs: { nzShape: "nzShape", nzSize: "nzSize" }, features: [i0.ɵɵNgOnChangesFeature], attrs: _c1, decls: 1, vars: 12, template: function NzSkeletonElementAvatarComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelement(0, "span");
    } if (rf & 2) {
        i0.ɵɵstyleMap(ctx.styleMap);
        i0.ɵɵclassProp("ant-skeleton-avatar", true)("ant-skeleton-avatar-square", ctx.nzShape === "square")("ant-skeleton-avatar-circle", ctx.nzShape === "circle")("ant-skeleton-avatar-lg", ctx.nzSize === "large")("ant-skeleton-avatar-sm", ctx.nzSize === "small");
    } }, encapsulation: 2, changeDetection: 0 });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(NzSkeletonElementAvatarComponent, [{
        type: Component,
        args: [{
                changeDetection: ChangeDetectionStrategy.OnPush,
                selector: 'nz-skeleton-element[nzType="avatar"]',
                template: `
    <span
      [class.ant-skeleton-avatar]="true"
      [class.ant-skeleton-avatar-square]="nzShape === 'square'"
      [class.ant-skeleton-avatar-circle]="nzShape === 'circle'"
      [class.ant-skeleton-avatar-lg]="nzSize === 'large'"
      [class.ant-skeleton-avatar-sm]="nzSize === 'small'"
      [style]="styleMap"
    >
    </span>
  `
            }]
    }], null, { nzShape: [{
            type: Input
        }], nzSize: [{
            type: Input
        }] }); })();
export class NzSkeletonElementInputComponent {
}
/** @nocollapse */ NzSkeletonElementInputComponent.ɵfac = function NzSkeletonElementInputComponent_Factory(t) { return new (t || NzSkeletonElementInputComponent)(); };
/** @nocollapse */ NzSkeletonElementInputComponent.ɵcmp = i0.ɵɵdefineComponent({ type: NzSkeletonElementInputComponent, selectors: [["nz-skeleton-element", "nzType", "input"]], inputs: { nzSize: "nzSize" }, attrs: _c2, decls: 1, vars: 6, template: function NzSkeletonElementInputComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelement(0, "span");
    } if (rf & 2) {
        i0.ɵɵclassProp("ant-skeleton-input", true)("ant-skeleton-input-lg", ctx.nzSize === "large")("ant-skeleton-input-sm", ctx.nzSize === "small");
    } }, encapsulation: 2, changeDetection: 0 });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(NzSkeletonElementInputComponent, [{
        type: Component,
        args: [{
                changeDetection: ChangeDetectionStrategy.OnPush,
                selector: 'nz-skeleton-element[nzType="input"]',
                template: `
    <span
      [class.ant-skeleton-input]="true"
      [class.ant-skeleton-input-lg]="nzSize === 'large'"
      [class.ant-skeleton-input-sm]="nzSize === 'small'"
    >
    </span>
  `
            }]
    }], null, { nzSize: [{
            type: Input
        }] }); })();
//# sourceMappingURL=data:application/json;base64, 