import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "../../../../switch/switch.component";
import * as i3 from "./custom-view.component";
export class ViewCellComponent {
}
ViewCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ViewCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
ViewCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ViewCellComponent, selector: "table-cell-view-mode", inputs: { cell: "cell", isExpanded: "isExpanded" }, ngImport: i0, template: `
        <ng-container [ngSwitch]="cell.column.type">
            <custom-view-component *ngSwitchCase="'custom'" [cell]="cell" [isExpanded]="isExpanded"></custom-view-component>

            <div *ngSwitchCase="'html'" [innerHTML]="cell.getValue() || '-'" class="uno-smart-table-cell-view view-html line-clamp"></div>

            <uno-switch *ngSwitchCase="'switch'" [checked]="cell.getValue()" [disable]="true"></uno-switch>

            <div
                *ngSwitchDefault
                [title]="cell.getValue() || '-'"
                class="uno-smart-table-cell-view line-clamp"
                [ngClass]="{ 'view-default-expanded': isExpanded }"
                [style.max-width]="cell.column.width || '100%'">
                {{ cell.getValue() || '-' }}
            </div>
        </ng-container>
    `, isInline: true, styles: [":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em}:host input.form-control.ng-invalid.ng-touched,:host textarea.form-control.ng-invalid.ng-touched{border:1px solid var(--special-red-2)}:host input.form-control.ng-valid.ng-touched:not(.no-validator),:host textarea.form-control.ng-valid.ng-touched:not(.no-validator){border:none}.line-clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:normal;overflow:hidden}.view-default-expanded{text-align:justify;word-wrap:break-word}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i2.SwitchComponent, selector: "uno-switch", inputs: ["checked", "disable", "minWidth", "size", "enabledText", "disabledText"], outputs: ["changed"] }, { kind: "component", type: i3.CustomViewComponent, selector: "custom-view-component", inputs: ["cell", "isExpanded"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ViewCellComponent, decorators: [{
            type: Component,
            args: [{ selector: 'table-cell-view-mode', changeDetection: ChangeDetectionStrategy.OnPush, template: `
        <ng-container [ngSwitch]="cell.column.type">
            <custom-view-component *ngSwitchCase="'custom'" [cell]="cell" [isExpanded]="isExpanded"></custom-view-component>

            <div *ngSwitchCase="'html'" [innerHTML]="cell.getValue() || '-'" class="uno-smart-table-cell-view view-html line-clamp"></div>

            <uno-switch *ngSwitchCase="'switch'" [checked]="cell.getValue()" [disable]="true"></uno-switch>

            <div
                *ngSwitchDefault
                [title]="cell.getValue() || '-'"
                class="uno-smart-table-cell-view line-clamp"
                [ngClass]="{ 'view-default-expanded': isExpanded }"
                [style.max-width]="cell.column.width || '100%'">
                {{ cell.getValue() || '-' }}
            </div>
        </ng-container>
    `, styles: [":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em}:host input.form-control.ng-invalid.ng-touched,:host textarea.form-control.ng-invalid.ng-touched{border:1px solid var(--special-red-2)}:host input.form-control.ng-valid.ng-touched:not(.no-validator),:host textarea.form-control.ng-valid.ng-touched:not(.no-validator){border:none}.line-clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:normal;overflow:hidden}.view-default-expanded{text-align:justify;word-wrap:break-word}\n"] }]
        }], propDecorators: { cell: [{
                type: Input
            }], isExpanded: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJz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