import{ElementBuilder}from"../../base/builder.mjs";import{Controller}from"../base.mjs";const E=new ElementBuilder;class AnimationsController extends Controller{async toggleAnimations(){this.application.animations?(this.application.disableAnimations(),this.animationStatusIndicator.removeClass("fa-play").addClass("fa-stop").data("tooltip","Animations are disabled. Click to enable.")):(this.application.enableAnimations(),this.animationStatusIndicator.addClass("fa-play").removeClass("fa-stop").data("tooltip","Animations are enabled. Click to disable."))}async initialize(){this.animationStatusIndicator=E.i().class("fa-solid fa-play animations").data("tooltip","Animations are enabled. Click to disable.").on("click",(()=>this.toggleAnimations())),document.querySelector("header").appendChild(await this.animationStatusIndicator.render()),!1===this.application.session.getItem("animations")&&this.toggleAnimations()}}export{AnimationsController};
