/*! Strand UI | MIT License | dillingerstaffing.com */
import type { ComponentChildren, JSX } from "preact";
import { forwardRef } from "preact/compat";
import { useId, useRef, useState } from "preact/hooks";
import { cx } from "../../internal/index.js";
export interface TabItem {
id: string;
label: string;
content: ComponentChildren;
}
export interface TabsProps extends Omit, "onChange"> {
tabs: TabItem[];
/** Active tab id; leave unset to let the tabs own it. */
activeTab?: string;
/** Initial tab of uncontrolled tabs; the first tab by default. */
defaultActiveTab?: string;
onChange?: (id: string) => void;
/** `automatic` selects as the arrows move focus; `manual` moves focus only and selects on Enter or Space. */
activation?: "automatic" | "manual";
/** `instrument` renders the strip as a mono uppercase readout. */
variant?: "default" | "instrument";
}
/**
* Tabbed content switcher with the ARIA tabs pattern: arrows, Home and End move between tabs.
*
* @example
* A