import { Component, EventEmitter, Input, Output } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/forms";
export class CsCheckboxComponent {
    constructor() {
        this.readonly = false;
        this.ngValueChange = new EventEmitter();
    }
    ngOnInit() { }
    valueChanged() {
        this.ngValueChange.emit(this.ngValue);
    }
    chileClick(event) {
        event.stopPropagation();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CsCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CsCheckboxComponent, selector: "app-cs-checkbox", inputs: { disabled: "disabled", ngValue: "ngValue", value: "value", readonly: "readonly", oneLine: "oneLine" }, outputs: { ngValueChange: "ngValueChange" }, ngImport: i0, template: "<label class=\"checkbox-item\" [class.disabled]=\"disabled\" (click)=\"chileClick($event)\">\n  <input type=\"checkbox\" [name]=\"value\"  [disabled]=\"disabled\" [disabled]=\"readonly\" [class.enable]=\"readonly\" [(ngModel)]=\"ngValue\" (ngModelChange)=\"valueChanged()\" />\n  <span class=\"checkbox\">\n    <span class=\"inner\"></span>\n  </span>\n  <svg class=\"checkmark\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 52 52\" *ngIf=\"!oneLine\">\n    <circle class=\"checkmark__circle\" cx=\"26\" cy=\"26\" r=\"25\" fill=\"none\" />\n    <path class=\"checkmark__check\" fill=\"none\" d=\"M14.1 27.2l7.1 7.2 16.7-16.8\" />\n  </svg>\n  <svg id=\"check\" viewBox=\"-281 373 48 48\" *ngIf=\"oneLine\">\n    <path id=\"check-stroke\" d=\"M-273.2,398.2l10,9.9 l22.4-22.3\"/>\n  </svg>\n  <span class=\"value\"><ng-content></ng-content></span>\n</label>\n", styles: ["label.checkbox-item{display:inline-flex;align-items:center;cursor:pointer;margin:0;padding:0;max-width:100%}label.checkbox-item span{display:inline-flex;align-items:center;justify-content:center}label.checkbox-item span.checkbox{height:16px;width:16px;border-radius:2px;border:1px solid #dbdbdb;position:relative;padding:2px;margin-top:0}label.checkbox-item span.value{color:#747576;font-size:14px;line-height:16px;font-weight:400;margin-left:10px;max-width:calc(100% - 26px)}label.checkbox-item span.value:empty{display:none}label.checkbox-item svg{display:none;margin-top:0}label.checkbox-item input[type=checkbox]{display:none}label.checkbox-item input[type=checkbox]:checked~svg{display:block}label.checkbox-item input[type=checkbox]:checked+.checkbox{display:none}label.checkbox-item input[type=checkbox]:disabled~*{opacity:.7}label.checkbox-item input[type=checkbox].enable:disabled~*{opacity:1}label.checkbox-item.disabled{pointer-events:none}.disabled{opacity:.4!important}.checkmark{width:16px;height:16px;border-radius:2px;stroke-width:4;stroke:#fff;stroke-miterlimit:10;box-shadow:inset 0 0 #34aa44;animation:fill .4s ease-in-out .4s forwards,scale .3s ease-in-out .9s both}.checkmark.checked{animation:fill 0s ease-in-out 0s forwards,scale 0s ease-in-out 0s both}.checkmark__circle{stroke-dasharray:166;stroke-dashoffset:166;stroke-width:2;stroke-miterlimit:10;stroke:#34aa44;fill:none;animation:stroke .6s cubic-bezier(.65,0,.45,1) forwards}.checkmark__circle.checked{animation:stroke 0s cubic-bezier(.65,0,.45,1) forwards}.checkmark__check{transform-origin:50% 50%;stroke-dasharray:48;stroke-dashoffset:48;animation:stroke .3s cubic-bezier(.65,0,.45,1) .8s forwards}.checkmark__check.checked{animation:stroke 0s cubic-bezier(.65,0,.45,1) forwards}#check{width:100%}#check-stroke{stroke:#34aa44;fill:none;stroke-width:4;stroke-linecap:round;animation:stroke .3s cubic-bezier(.65,0,.45,1) .8s forwards;stroke-dasharray:100%,200%}@keyframes stroke{to{stroke-dashoffset:0}}@keyframes scale{0%,to{transform:none}50%{transform:scale3d(1.1,1.1,1)}}@keyframes fill{to{box-shadow:inset 0 0 0 30px #34aa44}}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CsCheckboxComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-cs-checkbox', template: "<label class=\"checkbox-item\" [class.disabled]=\"disabled\" (click)=\"chileClick($event)\">\n  <input type=\"checkbox\" [name]=\"value\"  [disabled]=\"disabled\" [disabled]=\"readonly\" [class.enable]=\"readonly\" [(ngModel)]=\"ngValue\" (ngModelChange)=\"valueChanged()\" />\n  <span class=\"checkbox\">\n    <span class=\"inner\"></span>\n  </span>\n  <svg class=\"checkmark\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 52 52\" *ngIf=\"!oneLine\">\n    <circle class=\"checkmark__circle\" cx=\"26\" cy=\"26\" r=\"25\" fill=\"none\" />\n    <path class=\"checkmark__check\" fill=\"none\" d=\"M14.1 27.2l7.1 7.2 16.7-16.8\" />\n  </svg>\n  <svg id=\"check\" viewBox=\"-281 373 48 48\" *ngIf=\"oneLine\">\n    <path id=\"check-stroke\" d=\"M-273.2,398.2l10,9.9 l22.4-22.3\"/>\n  </svg>\n  <span class=\"value\"><ng-content></ng-content></span>\n</label>\n", styles: ["label.checkbox-item{display:inline-flex;align-items:center;cursor:pointer;margin:0;padding:0;max-width:100%}label.checkbox-item span{display:inline-flex;align-items:center;justify-content:center}label.checkbox-item span.checkbox{height:16px;width:16px;border-radius:2px;border:1px solid #dbdbdb;position:relative;padding:2px;margin-top:0}label.checkbox-item span.value{color:#747576;font-size:14px;line-height:16px;font-weight:400;margin-left:10px;max-width:calc(100% - 26px)}label.checkbox-item span.value:empty{display:none}label.checkbox-item svg{display:none;margin-top:0}label.checkbox-item input[type=checkbox]{display:none}label.checkbox-item input[type=checkbox]:checked~svg{display:block}label.checkbox-item input[type=checkbox]:checked+.checkbox{display:none}label.checkbox-item input[type=checkbox]:disabled~*{opacity:.7}label.checkbox-item input[type=checkbox].enable:disabled~*{opacity:1}label.checkbox-item.disabled{pointer-events:none}.disabled{opacity:.4!important}.checkmark{width:16px;height:16px;border-radius:2px;stroke-width:4;stroke:#fff;stroke-miterlimit:10;box-shadow:inset 0 0 #34aa44;animation:fill .4s ease-in-out .4s forwards,scale .3s ease-in-out .9s both}.checkmark.checked{animation:fill 0s ease-in-out 0s forwards,scale 0s ease-in-out 0s both}.checkmark__circle{stroke-dasharray:166;stroke-dashoffset:166;stroke-width:2;stroke-miterlimit:10;stroke:#34aa44;fill:none;animation:stroke .6s cubic-bezier(.65,0,.45,1) forwards}.checkmark__circle.checked{animation:stroke 0s cubic-bezier(.65,0,.45,1) forwards}.checkmark__check{transform-origin:50% 50%;stroke-dasharray:48;stroke-dashoffset:48;animation:stroke .3s cubic-bezier(.65,0,.45,1) .8s forwards}.checkmark__check.checked{animation:stroke 0s cubic-bezier(.65,0,.45,1) forwards}#check{width:100%}#check-stroke{stroke:#34aa44;fill:none;stroke-width:4;stroke-linecap:round;animation:stroke .3s cubic-bezier(.65,0,.45,1) .8s forwards;stroke-dasharray:100%,200%}@keyframes stroke{to{stroke-dashoffset:0}}@keyframes scale{0%,to{transform:none}50%{transform:scale3d(1.1,1.1,1)}}@keyframes fill{to{box-shadow:inset 0 0 0 30px #34aa44}}\n"] }]
        }], ctorParameters: function () { return []; }, propDecorators: { disabled: [{
                type: Input
            }], ngValue: [{
                type: Input
            }], value: [{
                type: Input
            }], readonly: [{
                type: Input
            }], ngValueChange: [{
                type: Output
            }], oneLine: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2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