/**
 * Copyright Aquera Inc 2025
 *
 * This source code is licensed under the BSD-3-Clause license found in the
 * LICENSE file in the root directory of this source tree.
 */

import { html, CSSResultArray, TemplateResult } from 'lit';
import { customElement } from 'lit/decorators.js';
import { styles } from './nile-grid-body.css';
import NileElement from '../../internal/nile-element';

/**
 * Nile grid-body component.
 *
 * @tag nile-grid-body
 *
 */
@customElement('nile-grid-body')
export class NileGridBody extends NileElement {
  /**
   * The styles for nile-grid-body
   * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
   */
  public static get styles(): CSSResultArray {
    return [styles];
  }

  connectedCallback() {
    super.connectedCallback();
    this.setAttribute('role', 'rowgroup');
  }

  public render(): TemplateResult {
    return html`
      <div part="grid-body-base">
        <slot></slot>
      </div>
    `;
  }

  /* #endregion */
}

export default NileGridBody;

declare global {
  interface HTMLElementTagNameMap {
    'nile-grid-body': NileGridBody;
  }
}
