/**
* @license
* Copyright 2023 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { LitElement } from 'lit';
import { WithElementInternals } from './element-internals.js';
import { MixinBase, MixinReturn } from './mixin.js';
/**
* A form-associated element.
*
* IMPORTANT: Requires declares for lit-analyzer
* @example
* ```ts
* const base = mixinFormAssociated(mixinElementInternals(LitElement));
* class MyControl extends base {
* // Writable mixin properties for lit-html binding, needed for lit-analyzer
* declare disabled: boolean;
* declare name: string;
* }
* ```
*/
export interface FormAssociated {
/**
* The associated form element with which this element's value will submit.
*/
readonly form: HTMLFormElement | null;
/**
* The labels this element is associated with.
*/
readonly labels: NodeList;
/**
* The HTML name to use in form submission.
*/
name: string;
/**
* Whether or not the element is disabled.
*/
disabled: boolean;
/**
* Gets the current form value of a component.
*
* @return The current form value.
*/
[getFormValue](): FormValue | null;
/**
* Gets the current form state of a component. Defaults to the component's
* `[formValue]`.
*
* Use this when the state of an element is different from its value, such as
* checkboxes (internal boolean state and a user string value).
*
* @return The current form state, defaults to the form value.
*/
[getFormState](): FormValue | null;
/**
* A callback for when a form component should be disabled or enabled. This
* can be called in a variety of situations, such as disabled `