import { LitElement, css, html } from "lit";
import { customElement, property } from "lit/decorators.js";
import { map } from "lit/directives/map.js";
import { getItemDisplayClasses } from "../../common/layout/item-layout-utils.js";
import { withTailwindStyles } from "../../../decorators/with-tailwind-styles.js";
function _ts_decorate(decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);
    else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function _ts_metadata(k, v) {
    if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
}
class AtomicResultTablePlaceholder extends LitElement {
    getClasses() {
        return getItemDisplayClasses('table', this.density, this.imageSize);
    }
    render() {
        return html`
      <table class="list-root animate-pulse ${this.getClasses().join(' ')}">
        <thead aria-hidden="true">
          <tr>
            <th>
              <div
                class="mt-2 h-8 block bg-neutral rounded"
                style="width: 14.5rem;"
              ></div>
            </th>
            <th>
              <div
                class="mt-2 h-8 block bg-neutral rounded"
                style="width: 9.75rem;"
              ></div>
            </th>
            <th>
              <div
                class="mt-2 h-8 block bg-neutral rounded"
                style="width: 6.5rem;"
              ></div>
            </th>
          </tr>
        </thead>
        <tbody>
          ${map(Array.from({
            length: this.rows
        }), ()=>html`
              <tr>
                <td>
                  <div
                    class="mb-6 h-8 block bg-neutral rounded"
                    style="width: 22.875rem;"
                  ></div>
                  <div
                    class="mb-2 h-5 block bg-neutral rounded"
                    style="width: 23.75rem;"
                  ></div>
                  <div
                    class="h-5 block bg-neutral rounded"
                    style="width: 11.5rem;"
                  ></div>
                </td>
                <td>
                  <div
                    class="mt-1.5 h-5 block bg-neutral rounded"
                    style="width: 11rem;"
                  ></div>
                </td>
                <td>
                  <div
                    class="mt-1.5 h-5 block bg-neutral rounded"
                    style="width: 4.875rem;"
                  ></div>
                </td>
              </tr>
            `)}
        </tbody>
      </table>
    `;
    }
}
AtomicResultTablePlaceholder.styles = css`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-border-style:solid}}}:host{display:grid}.list-root.display-table{border-collapse:separate;border-spacing:0;min-width:100%}.list-root.display-table td,.list-root.display-table th{border-color:var(--atomic-neutral);border-style:var(--tw-border-style);border-width:1px;font-family:var(--atomic-font-family);font-size:var(--atomic-text-sm);line-height:var(--tw-leading,var(--text-sm--line-height,1.42857));line-height:1rem;white-space:nowrap}:is(.list-root.display-table th,.list-root.display-table td):not(:first-child){border-left:none}:is(.list-root.display-table th,.list-root.display-table td):first-child{min-width:19rem}.list-root.display-table th{background-color:var(--atomic-neutral-light);border-bottom:none;color:#000;font-weight:700;padding:1rem var(--padding);text-align:left}.list-root.display-table th:first-child{border-top-left-radius:var(--atomic-border-radius-xl)}.list-root.display-table th:last-child{border-top-right-radius:var(--atomic-border-radius-xl)}.list-root.display-table td{border-top:none;color:var(--atomic-neutral-dark);padding:var(--padding);vertical-align:top}.list-root.display-table.density-comfortable{--padding:2rem}.list-root.display-table.density-normal{--padding:1.5rem}.list-root.display-table.density-compact{--padding:1rem}.list-root.display-table{border-color:var(--atomic-neutral);border-radius:var(--atomic-border-radius-xl);border-style:var(--tw-border-style);border-width:1px}.list-root.display-table tbody tr:not(:last-child),.list-root.display-table thead tr{position:relative}:is(.list-root.display-table thead tr,.list-root.display-table tbody tr:not(:last-child)):after{background-color:var(--atomic-neutral);bottom:0;content:" ";display:block;height:1px;left:var(--padding);position:absolute;right:var(--padding)}.list-root.display-table td,.list-root.display-table th{border-color:#0000;border-radius:initial}.list-root.display-table th{background-color:#0000}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}`;
_ts_decorate([
    property({
        type: String
    }),
    _ts_metadata("design:type", "u" < typeof ItemDisplayDensity ? Object : ItemDisplayDensity)
], AtomicResultTablePlaceholder.prototype, "density", void 0);
_ts_decorate([
    property({
        type: String,
        attribute: 'image-size'
    }),
    _ts_metadata("design:type", "u" < typeof ItemDisplayImageSize ? Object : ItemDisplayImageSize)
], AtomicResultTablePlaceholder.prototype, "imageSize", void 0);
_ts_decorate([
    property({
        type: Number
    }),
    _ts_metadata("design:type", Number)
], AtomicResultTablePlaceholder.prototype, "rows", void 0);
AtomicResultTablePlaceholder = _ts_decorate([
    customElement('atomic-result-table-placeholder'),
    withTailwindStyles
], AtomicResultTablePlaceholder);
export { AtomicResultTablePlaceholder };
