import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
import { SwitchComponent } from '../../../../switch/switch.component';
import { CustomViewComponent } from './custom-view.component';
import { NgClass } from '@angular/common';
import * as i0 from "@angular/core";
export class ViewCellComponent {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ViewCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ViewCellComponent, isStandalone: true, selector: "table-cell-view-mode", inputs: { cell: "cell", isExpanded: "isExpanded" }, ngImport: i0, template: `
@switch (cell.column.type) {
  @case ('custom') {
    <custom-view-component [cell]="cell" [isExpanded]="isExpanded"></custom-view-component>
  }
  @case ('html') {
    <div [innerHTML]="cell.getValue() || '-'" class="uno-smart-table-cell-view view-html line-clamp"></div>
  }
  @case ('switch') {
    <uno-switch [checked]="cell.getValue()" [disable]="true"></uno-switch>
  }
  @default {
    <div
      [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>
  }
}
`, 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: "component", type: CustomViewComponent, selector: "custom-view-component", inputs: ["cell", "isExpanded"] }, { kind: "component", type: SwitchComponent, selector: "uno-switch", inputs: ["checked", "disable", "minWidth", "size", "enabledText", "disabledText"], outputs: ["changed"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ViewCellComponent, decorators: [{
            type: Component,
            args: [{ selector: 'table-cell-view-mode', changeDetection: ChangeDetectionStrategy.OnPush, template: `
@switch (cell.column.type) {
  @case ('custom') {
    <custom-view-component [cell]="cell" [isExpanded]="isExpanded"></custom-view-component>
  }
  @case ('html') {
    <div [innerHTML]="cell.getValue() || '-'" class="uno-smart-table-cell-view view-html line-clamp"></div>
  }
  @case ('switch') {
    <uno-switch [checked]="cell.getValue()" [disable]="true"></uno-switch>
  }
  @default {
    <div
      [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>
  }
}
`, standalone: true, imports: [
                        CustomViewComponent,
                        SwitchComponent,
                        NgClass
                    ], 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlldy1jZWxsLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3Vuby11aS1saWIvc3JjL2xpYi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