import {BaseElement, Animation} from "./smart.element" export interface ButtonProperties { /** * Specifies the animation mode for the element. When set to 'none', all animations are disabled. Use this property to enable, disable, or customize the animation behavior as needed. You can get the current animation mode or assign a new value to control how animations are applied. * Default value: advanced */ animation?: Animation | string; /** * Specifies how the element responds to user click interactions, such as triggering specific actions, toggling states, or initiating custom event handling based on the selected mode. * Default value: release */ clickMode?: ClickMode | string; /** * Specifies the inner content of the element, such as text, HTML, or child elements, determining what is displayed inside the element on the web page. * Default value: "" */ content?: any; /** * Determines whether the button is interactive. When enabled ('true'), users can click and interact with the button. When disabled ('false'), the button appears inactive and does not respond to user actions. * Default value: false */ disabled?: boolean; /** * Updates the contents of the element by setting its inner HTML to the specified value. This replaces all existing child elements and text within the element with the provided HTML markup. Use caution when inserting user-generated content to avoid security risks such as cross-site scripting (XSS). * Default value: """" */ innerHTML: string; /** * Handles the retrieval or assignment of the 'unlockKey', a unique value required to authorize and unlock access to the product's features or content. * Default value: "" */ unlockKey?: string; /** * Specifies the language code to use for retrieving or displaying messages. When set, it determines which localized message set from the messages property is used. Getting this property returns the current language code. Typically used for enabling multi-language support within the application. * Default value: "en" */ locale?: string; /** * A callback function that allows you to define or modify the formatting of messages returned by the Localization Module. Use this callback to customize how localized messages are structured or displayed before they are delivered to your application. * Default value: null */ localizeFormatFunction?: any; /** * Defines or retrieves an object containing localized strings for the widget's user interface. This property allows you to customize text displayed by the widget for different languages and regions, and works in conjunction with the locale property to ensure proper localization. * Default value: * { * "en": { * "propertyUnknownType": "'' property is with undefined 'type' member!", * "propertyInvalidValue": "Invalid '!", * "propertyInvalidValueType": "Invalid '!", * "elementNotInDOM": "Element does not exist in DOM! Please, add the element to the DOM, before invoking a method.", * "moduleUndefined": "Module is undefined.", * "missingReference": ".", * "htmlTemplateNotSuported": ": Browser doesn't support HTMLTemplate elements.", * "invalidTemplate": "' property accepts a string that must match the id of an HTMLTemplate element from the DOM." * } * } */ messages?: any; /** * Defines or retrieves the name attribute of the element. The name attribute uniquely identifies form elements when submitting data through an HTML form, allowing the server to associate input values with their corresponding fields. This attribute is essential for processing form data correctly. * Default value: """" */ name?: string; /** * If the custom element is set to readonly, users will not be able to modify its value or content through direct interaction (such as typing, selecting, or dragging). However, the element may still be focusable and its value can be changed programmatically via scripts. User-initiated actions that would normally alter its state are disabled. * Default value: false */ readonly?: boolean; /** * Gets or sets a value that determines whether the element's alignment supports right-to-left (RTL) text direction, which is typically used by languages such as Arabic or Hebrew. When enabled, the element is properly aligned to display content for RTL locales. * Default value: false */ rightToLeft?: boolean; /** * Specifies the visual theme applied to the element, which controls its overall appearance, including colors, fonts, and styling. This property allows you to select a predefined look and feel for the element. * Default value: "" */ theme?: string; /** * Specifies or retrieves the button's type attribute, which determines the button's behavior—such as "submit" to submit a form, "reset" to reset form fields, or "button" for a general-purpose clickable button. * Default value: "Reset" */ type?: string; /** * Sets or retrieves the button's value attribute, which typically defines the text displayed on the button or the value submitted when the button is used in a form. * Default value: "" */ value?: string; /** * When set to true, this property prevents the element from receiving keyboard focus, making it impossible for users to select the element using the Tab key or other navigation methods. * Default value: false */ unfocusable?: boolean; } /** Buttons allow users to take actions, and make choices, with a single tap. Buttons communicate actions that users can take. */ export interface Button extends BaseElement, ButtonProperties { /* Get a member by its name */ [name: string]: any; /** * The click event is triggered based on the selected clickMode, meaning the event behavior will vary depending on the current setting of the clickMode property. * @param event. The custom event. */ onClick: ((this: any, ev: Event) => any) | null; } declare global { interface Document { createElement(tagName: "smart-button"): Button; querySelector(selectors: "smart-button"): Button | null; querySelectorAll(selectors: "smart-button"): NodeListOf