import { attachInternals as e } from "../utils/a11y.js";
//#region src/internal/controllers/type-closable.controller.ts
var t = class {
	constructor(e) {
		this.host = e, this.host.addController(this);
	}
	hostConnected() {
		e(this.host), this.host.addEventListener("command", () => {
			this.host.hidden = !0, this.#e();
		});
	}
	close() {
		this.host.closable && this.#e();
	}
	#e() {
		this.host.dispatchEvent(new CustomEvent("close", {
			bubbles: !0,
			composed: !0
		}));
	}
};
//#endregion
export { t as TypeClosableController };

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