"use strict";(self.webpackChunkelement_web=self.webpackChunkelement_web||[]).push([[5438],{"./src/async-components/views/dialogs/eventindex/DisableEventIndexDialog.tsx":(e,s,t)=>{t.r(s),t.d(s,{default:()=>m});var n=t("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=t("./node_modules/react/index.js"),a=t("./src/components/views/dialogs/BaseDialog.tsx"),r=t("./src/components/views/elements/Spinner.tsx"),l=t("./src/components/views/elements/DialogButtons.tsx"),o=t("./src/dispatcher/dispatcher.ts"),c=t("./src/languageHandler.tsx"),d=t("./src/settings/SettingsStore.ts"),g=t("./src/indexing/EventIndexPeg.ts"),p=t("./src/dispatcher/actions.ts"),u=t("./src/settings/SettingLevel.ts");class m extends i.Component{constructor(e){super(e),(0,n.A)(this,"onDisable",async()=>{this.setState({disabling:!0}),await d.A.setValue("enableEventIndexing",null,u.p.DEVICE,!1),await g.A.deleteEventIndex(),this.props.onFinished(!0),o.A.fire(p.r.ViewUserSettings)}),this.state={disabling:!1}}render(){return i.createElement(a.A,{onFinished:this.props.onFinished,title:(0,c._t)("common|are_you_sure")},(0,c._t)("settings|security|message_search_disable_warning"),this.state.disabling?i.createElement(r.A,null):i.createElement("div",null),i.createElement(l.A,{primaryButton:(0,c._t)("action|disable"),onPrimaryButtonClick:this.onDisable,primaryButtonClass:"danger",cancelButtonClass:"warning",onCancel:this.props.onFinished,disabled:this.state.disabling}))}}}}]);
//# sourceMappingURL=5438.js.map