(()=>{"use strict";var e={d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{blockAdminSettings:()=>c});const o=window.qf.blocks,n=window.qf.adminComponents,a=window.wp.components,r=(window.wp.element,window.emotion,e=>{const{id:t,attributes:o,setAttributes:r}=e,{showButton:l,buttonText:c,buttonMode:i,redirectUrl:d,autoRedirect:u,autoRedirectUrl:m,autoRedirectLag:L,redirectOnSameWindow:b}=o,s=[{key:"reload",name:"Reload"},{key:"redirect",name:"Redirect"}];return React.createElement(React.Fragment,null,React.createElement(n.BaseControl,null,React.createElement(n.ControlWrapper,{orientation:"horizontal"},React.createElement(n.ControlLabel,{label:"Auto redirect"}),React.createElement(n.ToggleControl,{checked:u,onChange:()=>r({autoRedirect:!u})}))),u&&React.createElement(n.BaseControl,null,React.createElement(n.ControlWrapper,{orientation:"vertical"},React.createElement(n.ControlLabel,{label:"Auto redirect url"}),React.createElement(n.ComboboxControl,{id:t,value:{type:"text",value:m},onChange:e=>r({autoRedirectUrl:e.value}),isToggleEnabled:!1,placeholder:"https://"})),React.createElement(a.RangeControl,{label:"Auto redirect after (sec)",value:L,onChange:e=>r({autoRedirectLag:e}),min:0,max:5,step:.1})),React.createElement(n.BaseControl,null,React.createElement(n.ControlWrapper,{orientation:"horizontal"},React.createElement(n.ControlLabel,{label:"Button"}),React.createElement(n.ToggleControl,{checked:l,onChange:()=>r({showButton:!l})})),l&&React.createElement(n.TextControl,{placeholder:"Button Text",value:c,onChange:e=>r({buttonText:e})})),l&&React.createElement(n.BaseControl,null,React.createElement(n.ControlWrapper,{orientation:"horizontal"},React.createElement(n.ControlLabel,{label:"Button Mode"}),React.createElement(n.SelectControl,{value:s.find((e=>e.key===i)),onChange:({selectedItem:e})=>r({buttonMode:e.key}),options:s})),"redirect"===i&&React.createElement(React.Fragment,null,React.createElement(n.ComboboxControl,{id:t,value:{type:"text",value:d},onChange:e=>r({redirectUrl:e.value}),isToggleEnabled:!1,placeholder:"https://"}),React.createElement(n.ControlWrapper,{orientation:"horizontal"},React.createElement(n.ControlLabel,{label:"Redirect on same window"}),React.createElement(n.ToggleControl,{checked:b,onChange:()=>r({redirectOnSameWindow:!b})})))))}),{name:l}={name:"thankyou-screen",attributes:{autoRedirect:{type:"boolean",default:!1},autoRedirectUrl:{type:"string",default:""},autoRedirectLag:{type:"number",default:.5},showButton:{type:"boolean",default:!0},buttonText:{type:"string",default:"Again"},buttonMode:{type:"string",default:"reload",enum:["reload","redirect"]},redirectUrl:{type:"string",default:""},redirectOnSameWindow:{type:"boolean",default:!0}},supports:{editable:!1,required:!1,attachment:!0,description:!0,logic:!1}},c={color:"#bf5c73",icon:()=>React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},React.createElement("path",{d:"M 5 3 L 5 4 L 5 28 L 5 29 L 6 29 L 22 29 L 23 29 L 23 28 L 23 25 L 23 24.03125 L 23 23.1875 L 21.90625 22.125 L 21.0625 21.25 L 21 21.25 L 21 24.03125 L 21 25 L 21 27 L 7 27 L 7 5 L 21 5 L 21 8.03125 L 21 10.8125 L 21.90625 9.875 L 23 8.8125 L 23 6.875 L 23 4 L 23 3 L 22 3 L 6 3 L 5 3 z M 23.34375 11.28125 L 21.90625 12.71875 L 24.1875 15 L 12 15 L 12 17 L 24.1875 17 L 21.90625 19.28125 L 23.34375 20.71875 L 27.34375 16.71875 L 28.03125 16 L 27.34375 15.28125 L 23.34375 11.28125 z",overflow:"visible"})),controls:r,title:"Thank You Screen",order:0};(0,o.setBlockAdminSettings)(l,c),(window.qf=window.qf||{}).blocklibThankyouScreenBlockAdmin=t})();