(()=>{var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};(()=>{"use strict";const t=flarum.core.compat["admin/app"];var n=e.n(t);function r(e){return 4!==e.length?e:"#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]}n().initializers.add("neoncube-private-messages",(function(){n().extensionData.for("neoncube-private-messages").registerSetting({setting:"neoncube-private-messages.return_key",type:"bool",label:n().translator.trans("neoncube-private-messages.admin.settings.return_key"),help:n().translator.trans("neoncube-private-messages.admin.settings.return_key_help")}).registerSetting((function(){var e,t,s,o,a,i,l,c=(a=this.setting("neoncube-private-messages.initial_installed_version")(),i="1.4.0"===a,{senderBackgroundColor:r((l=getComputedStyle(document.documentElement,null)).getPropertyValue("--primary-color")),recipientBackgroundColor:i?r(l.getPropertyValue("--muted-more-color")):"#9CBF3E",senderTextColor:r(i?l.getPropertyValue("--secondary-color"):l.getPropertyValue("--text-color")),recipientTextColor:i?r(l.getPropertyValue("--secondary-color")):"#000000"}),u=this.setting("neoncube-private-messages.enable_custom_colors"),g=this.setting("neoncube-private-messages.sender_background_color"),p=this.setting("neoncube-private-messages.recipient_background_color"),d=this.setting("neoncube-private-messages.sender_text_color"),b=this.setting("neoncube-private-messages.recipient_text_color"),v=!1!==u()&&"0"!==u()&&""!==u(),_=null!=(e=g()||null)?e:c.senderBackgroundColor,y=null!=(t=p()||null)?t:c.recipientBackgroundColor,f=null!=(s=d()||null)?s:c.senderTextColor,k=null!=(o=b()||null)?o:c.recipientTextColor,h={width:"5em",background:"initial",border:"initial"};return m("div",{className:"neoncube-private-messages-color-settings-section",style:{"margin-bottom":"2em"}},m("h2",{style:{"margin-bottom":"0.25em"}},"Colors"),m("div",{style:{display:"flex",gap:"1em",margin:"1em 0"}},m("input",{id:"neoncube-private-messages-enable-custom-colors",type:"checkbox",checked:v,onchange:function(e){return u(e.target.checked)}}),m("label",{for:"neoncube-private-messages-enable-custom-colors"},n().translator.trans("neoncube-private-messages.admin.settings.enable_custom_colors"))),m("div",{className:"neoncube-private-messages-color-settings",style:{display:"grid","grid-template-columns":"auto 1fr",gap:"1em","align-items":"center",color:v?null:"gray"}},m("label",{for:"neoncube-private-messages-sender-background-color"},n().translator.trans("neoncube-private-messages.admin.settings.sender_background_color")),m("input",{id:"neoncube-private-messages-sender-background-color",disabled:!v,type:"color",value:_,onchange:function(e){return g(e.target.value)},style:h}),m("label",{for:"neoncube-private-messages-recipient-background-color"},n().translator.trans("neoncube-private-messages.admin.settings.recipient_background_color")),m("input",{id:"neoncube-private-messages-recipient-background-color",disabled:!v,type:"color",value:y,onchange:function(e){return p(e.target.value)},style:h}),m("label",{for:"neoncube-private-messages-sender-text-color"},n().translator.trans("neoncube-private-messages.admin.settings.sender_text_color")),m("input",{id:"neoncube-private-messages-sender-text-color",disabled:!v,type:"color",value:f,onchange:function(e){return d(e.target.value)},style:h}),m("label",{for:"neoncube-private-messages-recipient-text-color"},n().translator.trans("neoncube-private-messages.admin.settings.recipient_text_color")),m("input",{id:"neoncube-private-messages-recipient-text-color",disabled:!v,type:"color",value:k,onchange:function(e){return b(e.target.value)},style:h})))})).registerPermission({icon:"fas fa-user-lock",label:n().translator.trans("neoncube-private-messages.admin.permissions.start_label"),permission:"startConversation"},"start").registerPermission({icon:"fas fa-user-lock",label:n().translator.trans("neoncube-private-messages.admin.permissions.allow_users_to_receive_email_notifications"),permission:"neoncube-private-messages.allowUsersToReceiveEmailNotifications"},"start")}))})(),module.exports={}})();
//# sourceMappingURL=admin.js.map