import { IconButtonToggleBase } from '@material/mwc-icon-button-toggle/mwc-icon-button-toggle-base'; import { type CSSResult, type HTMLTemplateResult } from 'lit'; import { type IconName } from '@equinor/fusion-wc-icon'; import type { IconButtonColor, IconButtonSize } from '../icon-button/types'; export type IconButtonToggleElementProps = { /** Use toggle active state */ on?: boolean; /** The icon for button "on" state */ onIcon?: IconName | string; /** The icon for button "off" state */ offIcon?: IconName | string; /** Accessible label for the button */ ariaLabel?: string; /** aria-label of the button when on is true */ ariaLabelOn?: string; /** aria-label of the button when on is false */ ariaLabelOff?: string; /** Sets the color of "on" state */ onColor?: IconButtonColor; /** Sets the color of "off" state */ offColor?: IconButtonColor; /** Sets the size */ size?: IconButtonSize; /** Sets the shape of ripple */ rounded?: boolean; /** Sets the icon button to disabled */ disabled?: boolean; }; /** * Element for rendering an icon button toggle with on/off state. * {@inheritdoc} * * @tag fwc-icon-button-toggle * * @property {boolean} on - true to use whether the toggle is activated. * @property {IconName} onIcon - Sets the icon of the icon buttons element "on" state. * @property {IconName} offIcon - Sets the icon of the icon button element "off" state. * @property {IconButtonSize} size - Sets the size of the icon button element. * @property {IconButtonColor} onColor - Sets the color of the on icon buttons element "on" state. * @property {IconButtonColor} offColor - Sets the color of the on icon buttons element "off" state. Used for primary color change. * @property {boolean} rounded - Sets the shape of the icon button element to rounded or square. * @property {boolean} disabled - Sets the icon button to disabled. * @property {string} ariaLabel - Accessible label for the button. Used if ariaLabelOn and ariaLabelOff is set. * @property {string} ariaLabelOn - aria-label of the button when on is true. If set, ariaLabelOff must also be set. * @property {string} ariaLabelOff - aria-label of the button when on is false. If set, ariaLabelOn must also be set. * * @fires icon-button-toggle-change - Indicates the button has been toggled. isOn indicates the on value of the toggle button. * */ export declare class IconButtonToggleElement extends IconButtonToggleBase implements IconButtonToggleElementProps { static styles: CSSResult[]; onColor?: IconButtonColor; offColor?: IconButtonColor; size?: IconButtonSize; rounded?: boolean; onIcon: IconName | string; offIcon: IconName | string; /** * override rendering of the ripple * @returns the ripple for setting up 'unbounded' as an additional property */ renderRipple(): HTMLTemplateResult | string; /** * override render of the icon button * @returns full render of IconButtonBase with fwc-icon used instead of alredy used material icon */ render(): HTMLTemplateResult; } export default IconButtonToggleElement;