"use strict";(("undefined"!=typeof self?self:global).webpackChunkopen=("undefined"!=typeof self?self:global).webpackChunkopen||[]).push([[924],{98454:(e,t,n)=>{n.r(t),n.d(t,{InAppMessagingPreviewTool:()=>g,default:()=>m});var l=n(67294),a=n.n(l),i=n(65858),s=n(99450),p=n(79145),r=n(5965);const o="eSfDJCRbxcgjQOuJba3X",c="E_ZkPF7R2fwnynIBQu9b",d="OKVBpIKRY0UB0tKbOd53",u="mOunZCWRZ7BzPqCprBdQ",v=[{label:"Production",value:"prod"},{label:"Development",value:"dev"}],g=()=>{const e=(0,i.I0)(),t=(0,i.v9)((e=>e.inAppMessaging.env)),n=(0,i.v9)((e=>e.inAppMessaging.message)),[g,m]=(0,l.useState)(""),[E,f]=(0,l.useState)(""),[b,k]=(0,l.useState)(!1);(0,l.useEffect)((()=>{n&&b&&k(!1)}),[n,b]);const A=!n&&b;return a().createElement("div",{className:o},a().createElement("h1",null,"In-App Messaging Preview"),a().createElement("div",{className:c},a().createElement("div",null,a().createElement("label",{htmlFor:"desktop.settings.inAppMessagingEnv"},"Mode (endpoint):")),a().createElement(p.v,{dir:"auto",value:t,id:"desktop.settings.inAppMessagingEnv",onSelect:function(t){"prod"!==t&&"dev"!==t||e((0,r.q1)(t))}},v.map((({label:e,value:t})=>a().createElement("option",{key:t,value:t},e)))),a().createElement("div",null,a().createElement("label",{htmlFor:"desktop.settings.inAppMessagingCreativeId"},"Creative Id:")),a().createElement("div",null,a().createElement("input",{className:d,placeholder:"(eg. 12123434)",id:"desktop.settings.inAppMessagingCreativeId",name:"Creative Id",type:"text",value:g,onChange:function(e){m(e.target.value),k(!1)}})),a().createElement("div",null,a().createElement("label",{htmlFor:"desktop.settings.inAppMessagingAppUri"},"URI for Dynamic Content (optional):")),a().createElement("div",null,a().createElement("input",{className:d,placeholder:"(eg. spotify:artist:123)",id:"desktop.settings.inAppMessagingAppUri",name:"App Uri",type:"text",value:E,onChange:function(e){f(e.target.value),k(!1)}})),a().createElement("div",null),a().createElement("div",null),a().createElement("div",null,a().createElement(s.D,{colorSet:"invertedLight",onClick:function(t){t.preventDefault(),e((0,r.XJ)(g,E)),k(!1),window.setTimeout((()=>{k(!0)}),1e3)}},"Get Preview")),A&&a().createElement("div",{className:u},"No Messsage found")))},m=g}}]);
//# sourceMappingURL=in-app-messaging-preview.js.map