"use strict";var D=Object.create;var i=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var k=Object.getPrototypeOf;var M=Object.prototype.hasOwnProperty;var f=(t,e)=>i(t,"name",{value:e,configurable:true});var N=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:true})};var g=(t,e,o,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let s of I(e))if(!M.call(t,s)&&s!==o)i(t,s,{get:()=>e[s],enumerable:!(n=c(e,s))||n.enumerable})}return t};var d=(t,e,o)=>(o=t!=null?D(k(t)):{},g(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:true}):o,t));var W=t=>g(i({},"__esModule",{value:true}),t);var h=(t,e,o,n)=>{var s=n>1?void 0:n?c(e,o):e;for(var l=t.length-1,m;l>=0;l--)if(m=t[l])s=(n?m(e,o,s):m(s))||s;if(n&&s)i(e,o,s);return s};var R={};N(R,{default:()=>_});module.exports=W(R);var r=require("react/jsx-runtime");var y=require("@mdi/js");var u=require("mobx-react");var b=require("react");var p=require("react-intl");var w=require("react-router-dom");var C=require("../../jsUtils");var E=d(require("../ui/effects/Appear"));var P=d(require("../ui/icon"));var K=d(require("../util/ErrorBoundary"));const v=(0,p.defineMessages)({closeSettings:{id:"settings.app.closeSettings",defaultMessage:"Close settings"}});let a=class extends b.Component{constructor(e){super(e);this.handleKeyDown=this.handleKeyDown.bind(this)}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown,false)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown,false)}handleKeyDown(e){if((0,C.isEscapeKeyPress)(e.key)){this.props.closeSettings()}}render(){const{navigation:e,closeSettings:o,intl:n}=this.props;return(0,r.jsx)(E.default,{transitionName:"fadeIn-fast",children:(0,r.jsx)("div",{className:"settings-wrapper",children:(0,r.jsxs)(K.default,{children:[(0,r.jsx)("button",{type:"button",className:"settings-wrapper__action",onClick:o,"aria-label":n.formatMessage(v.closeSettings)}),(0,r.jsxs)("div",{className:"settings franz-form",children:[e,(0,r.jsx)(w.Outlet,{}),(0,r.jsx)("button",{type:"button",className:"settings__close",onClick:o,"aria-label":n.formatMessage(v.closeSettings),children:(0,r.jsx)(P.default,{icon:y.mdiClose,size:1.35})})]})]})})})}};f(a,"SettingsLayout");a=h([u.observer],a);var _=(0,p.injectIntl)(a);
