import { attachInternals as e } from "../utils/a11y.js";
//#region src/internal/controllers/type-button.controller.ts
function t() {
	return (e) => e.addInitializer((e) => new n(e));
}
var n = class {
	#e;
	constructor(e) {
		this.host = e, this.host.addController(this);
	}
	hostConnected() {
		e(this.host), this.host.hasAttribute("tabindex") && (this.#e = this.host.tabIndex);
	}
	async hostUpdated() {
		await this.host.updateComplete, this.host._internals.role || (this.host._internals.role = "button"), this.host.tabIndex = this.host.disabled ? -1 : this.#e, this.host.readOnly && (this.host._internals.role = "none", this.host.tabIndex = -1, this.host.removeAttribute("tabindex"));
	}
};
//#endregion
export { n as TypeButtonController, t as typeButton };

//# sourceMappingURL=type-button.controller.js.map