import { html, nothing, type TemplateResult } from 'lit';
import type { NuiType } from '../../types/nui-type.js';
import type { TextareaSize, TextareaVariant } from './types.js';
export interface NuiTextareaViewState {
value: string;
placeholder: string;
disabled: boolean;
readonly: boolean;
invalid: boolean;
required: boolean;
name: string;
textareaId: string;
ariaLabel: string;
ariaLabelledby: string;
autocomplete: string;
maxlength: number;
minlength: number;
rows: number;
cols: number;
autoResize: boolean;
size: TextareaSize | '';
variant: TextareaVariant | '';
fluid: boolean;
nuiType: NuiType;
textareaClass: string;
}
export function getTextareaClass(textareaClass: string): string {
return ['nui-textarea-input', textareaClass].filter(Boolean).join(' ');
}
export function renderTextarea(
state: NuiTextareaViewState,
handlers: {
onInput: (event: Event) => void;
onChange: (event: Event) => void;
},
): TemplateResult {
return html`
`;
}