import { CommonModule } from '@angular/common';
import { Component, Input } from '@angular/core';
import { API_TABLE_COLUMN_LABELS } from './types';
import * as i0 from "@angular/core";
/**
 * val-docs-api-table
 *
 * A table component for documenting component APIs (inputs, outputs, methods).
 *
 * @example Properties table
 * ```html
 * <val-docs-api-table
 *   [props]="{
 *     title: 'Properties',
 *     items: [
 *       { name: 'disabled', type: 'boolean', default: 'false', description: 'Disables the button' },
 *       { name: 'color', type: 'string', default: 'primary', description: 'Button color variant' }
 *     ]
 *   }"
 * ></val-docs-api-table>
 * ```
 *
 * @example Events table
 * ```html
 * <val-docs-api-table
 *   [props]="{
 *     title: 'Events',
 *     columns: ['name', 'type', 'description'],
 *     items: [
 *       { name: 'click', type: 'EventEmitter<MouseEvent>', description: 'Emitted when clicked' }
 *     ]
 *   }"
 * ></val-docs-api-table>
 * ```
 */
export class DocsApiTableComponent {
    constructor() {
        this.props = { items: [] };
        this.columnLabels = API_TABLE_COLUMN_LABELS;
    }
    get displayColumns() {
        return this.props.columns || ['name', 'type', 'default', 'description'];
    }
    getColumnLabel(col) {
        return this.columnLabels[col];
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DocsApiTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: DocsApiTableComponent, isStandalone: true, selector: "val-docs-api-table", inputs: { props: "props" }, ngImport: i0, template: `
    <div
      class="docs-api-table"
      [class]="props.cssClass"
      [class.docs-api-table--bordered]="props.bordered !== false"
    >
      @if (props.title) {
        <h3 class="docs-api-table__title">{{ props.title }}</h3>
      }

      <div class="docs-api-table__wrapper">
        <table class="docs-api-table__table">
          <thead>
            <tr>
              @for (col of displayColumns; track col) {
                <th
                  scope="col"
                  class="docs-api-table__th"
                  [class.docs-api-table__th--name]="col === 'name'"
                  [class.docs-api-table__th--type]="col === 'type'"
                  [class.docs-api-table__th--default]="col === 'default'"
                  [class.docs-api-table__th--description]="col === 'description'"
                >
                  {{ getColumnLabel(col) }}
                </th>
              }
            </tr>
          </thead>
          <tbody>
            @for (item of props.items; track item.name) {
              <tr
                class="docs-api-table__row"
                [class.docs-api-table__row--deprecated]="item.deprecated"
              >
                @for (col of displayColumns; track col) {
                  <td
                    class="docs-api-table__td"
                    [class.docs-api-table__td--name]="col === 'name'"
                    [class.docs-api-table__td--type]="col === 'type'"
                    [class.docs-api-table__td--default]="col === 'default'"
                    [class.docs-api-table__td--description]="col === 'description'"
                    [attr.data-label]="getColumnLabel(col)"
                  >
                    @switch (col) {
                      @case ('name') {
                        <code class="docs-api-table__code">{{ item.name }}</code>
                        @if (item.required) {
                          <span class="docs-api-table__required" aria-label="Required" title="Required">*</span>
                        }
                        @if (item.deprecated) {
                          <span class="docs-api-table__badge docs-api-table__badge--deprecated" aria-label="This property is deprecated">Deprecated</span>
                        }
                      }
                      @case ('type') {
                        <code class="docs-api-table__type">{{ item.type || '-' }}</code>
                      }
                      @case ('default') {
                        <code class="docs-api-table__default">{{ item.default || '-' }}</code>
                      }
                      @case ('description') {
                        <span>{{ item.description || '-' }}</span>
                        @if (item.deprecated && item.deprecationNote) {
                          <div class="docs-api-table__deprecation-note">
                            {{ item.deprecationNote }}
                          </div>
                        }
                      }
                      @case ('required') {
                        {{ item.required ? 'Yes' : 'No' }}
                      }
                    }
                  </td>
                }
              </tr>
            }
          </tbody>
        </table>
      </div>

      @if (props.items.length === 0) {
        <p class="docs-api-table__empty">No items to display.</p>
      }
    </div>
  `, isInline: true, styles: [".docs-api-table{--table-bg: var(--ion-background-color, #fff);--table-border: var(--ion-border-color, #e0e0e0);--table-header-bg: #f8f9fa;--table-row-hover: rgba(0, 0, 0, .02);--table-text: var(--ion-text-color, #1a1a1a);--table-text-secondary: #5b6570;--code-bg: #f1f3f5;--code-text: #0d6efd;--type-bg: #e9ecef;--type-text: #495057;margin:1.5rem 0;font-family:var(--ion-font-family, system-ui, -apple-system, sans-serif)}.docs-api-table__title{font-size:1.25rem;font-weight:700;margin:0 0 1rem;color:var(--table-text)}.docs-api-table__wrapper{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}.docs-api-table__table{width:100%;min-width:620px;border-collapse:separate;border-spacing:0;font-size:.875rem;line-height:1.5;table-layout:fixed}.docs-api-table__th{text-align:left;padding:.625rem .75rem;font-weight:600;font-size:.8125rem;color:var(--table-text-secondary);background:var(--table-header-bg);border-bottom:2px solid var(--table-border);white-space:nowrap}.docs-api-table__th--name{width:120px}.docs-api-table__th--type{width:160px}.docs-api-table__th--default{width:110px}.docs-api-table__th--description{width:auto}.docs-api-table__td{padding:.625rem .75rem;border-bottom:1px solid var(--table-border);vertical-align:top;color:var(--table-text)}.docs-api-table__td--description{color:var(--table-text-secondary);line-height:1.5}.docs-api-table__row{transition:background-color .15s ease}.docs-api-table__row:hover{background:var(--table-row-hover)}.docs-api-table__row:last-child .docs-api-table__td{border-bottom:none}.docs-api-table__row--deprecated{opacity:.65}.docs-api-table__row--deprecated .docs-api-table__code{text-decoration:line-through}.docs-api-table__code{display:inline-block;font-family:SF Mono,Fira Code,Monaco,Consolas,monospace;font-size:.75rem;font-weight:500;color:var(--code-text);background:var(--code-bg);padding:.125rem .375rem;border-radius:4px;word-break:break-word}.docs-api-table__type,.docs-api-table__default{display:inline-block;font-family:SF Mono,Fira Code,Monaco,Consolas,monospace;font-size:.6875rem;font-weight:500;color:var(--type-text);background:var(--type-bg);padding:.1875rem .375rem;border-radius:4px;white-space:normal;word-break:break-word}.docs-api-table__required{color:var(--ion-color-danger, #dc3545);font-weight:700;margin-left:.25rem;font-size:1rem;vertical-align:middle}.docs-api-table__badge{display:inline-block;margin-left:.5rem;padding:.1875rem .5rem;font-size:.625rem;font-weight:600;text-transform:uppercase;letter-spacing:.025em;border-radius:4px;background:#e9ecef;color:#495057;vertical-align:middle}.docs-api-table__badge--deprecated{background:#fff3cd;color:#856404}.docs-api-table__deprecation-note{margin-top:.5rem;font-size:.75rem;font-style:italic;color:#856404}.docs-api-table__empty{padding:3rem;text-align:center;color:var(--table-text-secondary);font-style:italic}.docs-api-table--bordered .docs-api-table__wrapper{border:1px solid var(--table-border);border-radius:12px;overflow-x:auto;overflow-y:hidden;background:var(--table-bg)}.docs-api-table--bordered .docs-api-table__th:first-child{border-top-left-radius:11px}.docs-api-table--bordered .docs-api-table__th:last-child{border-top-right-radius:11px}@media (max-width: 768px){.docs-api-table__wrapper{overflow-x:visible}.docs-api-table__table{display:block;min-width:0;width:100%}.docs-api-table__table thead{display:none}.docs-api-table__table tbody{display:block}.docs-api-table__row{display:block;padding:1rem;margin-bottom:.5rem;border:1px solid var(--table-border);border-radius:8px;background:var(--table-bg)}.docs-api-table__row:last-child{margin-bottom:0}.docs-api-table__row:hover{background:var(--table-row-hover)}.docs-api-table__td{display:block;padding:.375rem 0;border:none!important;width:100%}.docs-api-table__td:before{content:attr(data-label);display:block;font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:var(--table-text-secondary);margin-bottom:.25rem}.docs-api-table__td--name{padding-bottom:.5rem;margin-bottom:.5rem;border-bottom:1px solid var(--table-border)!important}.docs-api-table__td--description:before{display:none}.docs-api-table--bordered .docs-api-table__wrapper{border:none;border-radius:0;background:transparent;overflow-x:visible}}:host-context(.dark) .docs-api-table,:host-context([color-scheme=dark]) .docs-api-table{--table-bg: #1e1e1e;--table-border: #3a3a3a;--table-header-bg: #252525;--table-row-hover: rgba(255, 255, 255, .03);--table-text: #f4f5f8;--table-text-secondary: #a0a0a0;--code-bg: rgba(56, 139, 253, .15);--code-text: #79b8ff;--type-bg: rgba(255, 255, 255, .08);--type-text: #c9d1d9}:host-context(.dark) .docs-api-table__badge,:host-context([color-scheme=dark]) .docs-api-table__badge{background:#ffffff14;color:#c9d1d9}:host-context(.dark) .docs-api-table__badge--deprecated,:host-context([color-scheme=dark]) .docs-api-table__badge--deprecated{background:#ffc10726;color:#ffc107}:host-context(.dark) .docs-api-table__deprecation-note,:host-context([color-scheme=dark]) .docs-api-table__deprecation-note{color:#ffc107}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DocsApiTableComponent, decorators: [{
            type: Component,
            args: [{ selector: 'val-docs-api-table', standalone: true, imports: [CommonModule], template: `
    <div
      class="docs-api-table"
      [class]="props.cssClass"
      [class.docs-api-table--bordered]="props.bordered !== false"
    >
      @if (props.title) {
        <h3 class="docs-api-table__title">{{ props.title }}</h3>
      }

      <div class="docs-api-table__wrapper">
        <table class="docs-api-table__table">
          <thead>
            <tr>
              @for (col of displayColumns; track col) {
                <th
                  scope="col"
                  class="docs-api-table__th"
                  [class.docs-api-table__th--name]="col === 'name'"
                  [class.docs-api-table__th--type]="col === 'type'"
                  [class.docs-api-table__th--default]="col === 'default'"
                  [class.docs-api-table__th--description]="col === 'description'"
                >
                  {{ getColumnLabel(col) }}
                </th>
              }
            </tr>
          </thead>
          <tbody>
            @for (item of props.items; track item.name) {
              <tr
                class="docs-api-table__row"
                [class.docs-api-table__row--deprecated]="item.deprecated"
              >
                @for (col of displayColumns; track col) {
                  <td
                    class="docs-api-table__td"
                    [class.docs-api-table__td--name]="col === 'name'"
                    [class.docs-api-table__td--type]="col === 'type'"
                    [class.docs-api-table__td--default]="col === 'default'"
                    [class.docs-api-table__td--description]="col === 'description'"
                    [attr.data-label]="getColumnLabel(col)"
                  >
                    @switch (col) {
                      @case ('name') {
                        <code class="docs-api-table__code">{{ item.name }}</code>
                        @if (item.required) {
                          <span class="docs-api-table__required" aria-label="Required" title="Required">*</span>
                        }
                        @if (item.deprecated) {
                          <span class="docs-api-table__badge docs-api-table__badge--deprecated" aria-label="This property is deprecated">Deprecated</span>
                        }
                      }
                      @case ('type') {
                        <code class="docs-api-table__type">{{ item.type || '-' }}</code>
                      }
                      @case ('default') {
                        <code class="docs-api-table__default">{{ item.default || '-' }}</code>
                      }
                      @case ('description') {
                        <span>{{ item.description || '-' }}</span>
                        @if (item.deprecated && item.deprecationNote) {
                          <div class="docs-api-table__deprecation-note">
                            {{ item.deprecationNote }}
                          </div>
                        }
                      }
                      @case ('required') {
                        {{ item.required ? 'Yes' : 'No' }}
                      }
                    }
                  </td>
                }
              </tr>
            }
          </tbody>
        </table>
      </div>

      @if (props.items.length === 0) {
        <p class="docs-api-table__empty">No items to display.</p>
      }
    </div>
  `, styles: [".docs-api-table{--table-bg: var(--ion-background-color, #fff);--table-border: var(--ion-border-color, #e0e0e0);--table-header-bg: #f8f9fa;--table-row-hover: rgba(0, 0, 0, .02);--table-text: var(--ion-text-color, #1a1a1a);--table-text-secondary: #5b6570;--code-bg: #f1f3f5;--code-text: #0d6efd;--type-bg: #e9ecef;--type-text: #495057;margin:1.5rem 0;font-family:var(--ion-font-family, system-ui, -apple-system, sans-serif)}.docs-api-table__title{font-size:1.25rem;font-weight:700;margin:0 0 1rem;color:var(--table-text)}.docs-api-table__wrapper{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}.docs-api-table__table{width:100%;min-width:620px;border-collapse:separate;border-spacing:0;font-size:.875rem;line-height:1.5;table-layout:fixed}.docs-api-table__th{text-align:left;padding:.625rem .75rem;font-weight:600;font-size:.8125rem;color:var(--table-text-secondary);background:var(--table-header-bg);border-bottom:2px solid var(--table-border);white-space:nowrap}.docs-api-table__th--name{width:120px}.docs-api-table__th--type{width:160px}.docs-api-table__th--default{width:110px}.docs-api-table__th--description{width:auto}.docs-api-table__td{padding:.625rem .75rem;border-bottom:1px solid var(--table-border);vertical-align:top;color:var(--table-text)}.docs-api-table__td--description{color:var(--table-text-secondary);line-height:1.5}.docs-api-table__row{transition:background-color .15s ease}.docs-api-table__row:hover{background:var(--table-row-hover)}.docs-api-table__row:last-child .docs-api-table__td{border-bottom:none}.docs-api-table__row--deprecated{opacity:.65}.docs-api-table__row--deprecated .docs-api-table__code{text-decoration:line-through}.docs-api-table__code{display:inline-block;font-family:SF Mono,Fira Code,Monaco,Consolas,monospace;font-size:.75rem;font-weight:500;color:var(--code-text);background:var(--code-bg);padding:.125rem .375rem;border-radius:4px;word-break:break-word}.docs-api-table__type,.docs-api-table__default{display:inline-block;font-family:SF Mono,Fira Code,Monaco,Consolas,monospace;font-size:.6875rem;font-weight:500;color:var(--type-text);background:var(--type-bg);padding:.1875rem .375rem;border-radius:4px;white-space:normal;word-break:break-word}.docs-api-table__required{color:var(--ion-color-danger, #dc3545);font-weight:700;margin-left:.25rem;font-size:1rem;vertical-align:middle}.docs-api-table__badge{display:inline-block;margin-left:.5rem;padding:.1875rem .5rem;font-size:.625rem;font-weight:600;text-transform:uppercase;letter-spacing:.025em;border-radius:4px;background:#e9ecef;color:#495057;vertical-align:middle}.docs-api-table__badge--deprecated{background:#fff3cd;color:#856404}.docs-api-table__deprecation-note{margin-top:.5rem;font-size:.75rem;font-style:italic;color:#856404}.docs-api-table__empty{padding:3rem;text-align:center;color:var(--table-text-secondary);font-style:italic}.docs-api-table--bordered .docs-api-table__wrapper{border:1px solid var(--table-border);border-radius:12px;overflow-x:auto;overflow-y:hidden;background:var(--table-bg)}.docs-api-table--bordered .docs-api-table__th:first-child{border-top-left-radius:11px}.docs-api-table--bordered .docs-api-table__th:last-child{border-top-right-radius:11px}@media (max-width: 768px){.docs-api-table__wrapper{overflow-x:visible}.docs-api-table__table{display:block;min-width:0;width:100%}.docs-api-table__table thead{display:none}.docs-api-table__table tbody{display:block}.docs-api-table__row{display:block;padding:1rem;margin-bottom:.5rem;border:1px solid var(--table-border);border-radius:8px;background:var(--table-bg)}.docs-api-table__row:last-child{margin-bottom:0}.docs-api-table__row:hover{background:var(--table-row-hover)}.docs-api-table__td{display:block;padding:.375rem 0;border:none!important;width:100%}.docs-api-table__td:before{content:attr(data-label);display:block;font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:var(--table-text-secondary);margin-bottom:.25rem}.docs-api-table__td--name{padding-bottom:.5rem;margin-bottom:.5rem;border-bottom:1px solid var(--table-border)!important}.docs-api-table__td--description:before{display:none}.docs-api-table--bordered .docs-api-table__wrapper{border:none;border-radius:0;background:transparent;overflow-x:visible}}:host-context(.dark) .docs-api-table,:host-context([color-scheme=dark]) .docs-api-table{--table-bg: #1e1e1e;--table-border: #3a3a3a;--table-header-bg: #252525;--table-row-hover: rgba(255, 255, 255, .03);--table-text: #f4f5f8;--table-text-secondary: #a0a0a0;--code-bg: rgba(56, 139, 253, .15);--code-text: #79b8ff;--type-bg: rgba(255, 255, 255, .08);--type-text: #c9d1d9}:host-context(.dark) .docs-api-table__badge,:host-context([color-scheme=dark]) .docs-api-table__badge{background:#ffffff14;color:#c9d1d9}:host-context(.dark) .docs-api-table__badge--deprecated,:host-context([color-scheme=dark]) .docs-api-table__badge--deprecated{background:#ffc10726;color:#ffc107}:host-context(.dark) .docs-api-table__deprecation-note,:host-context([color-scheme=dark]) .docs-api-table__deprecation-note{color:#ffc107}\n"] }]
        }], propDecorators: { props: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 