(()=>{"use strict";const e=window.qf.blocks,t=window.qf.adminComponents,a=window.React,l=window.wp.primitives,n=(0,a.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(l.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})),o=(0,a.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(l.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),r=window.wp.components,c=window.wp.i18n,i=window.emotion,m={color:"#d62575",icon:()=>React.createElement("svg",{fill:"currentColor",height:"32",width:"32",viewBox:"0 0 16 16"},React.createElement("path",{d:"M20 4v-2h2v2h-2zM13 6.75c0-0.412-0.338-0.75-0.75-0.75h-2.5c-0.412 0-0.75 0.338-0.75 0.75v0.25h-9v2h9v0.25c0 0.412 0.338 0.75 0.75 0.75h2.5c0.412 0 0.75-0.338 0.75-0.75v-0.25h3v-2h-3v-0.25zM10 9v-2h2v2h-2zM7 0"})),controls:({attributes:e,setAttributes:l})=>{const m=[{key:"no",name:(0,c.__)("No","quillforms")},{key:"yes",name:(0,c.__)("Yes","quillforms")},{key:"custom",name:(0,c.__)("Custom","quillforms")}],{min:s,max:u,step:p,prefix:d,suffix:h,marks:f,customMarks:E}=e,C=(e,t,a)=>{const n=[...E];n[e][t]=a,l({customMarks:n})};return React.createElement(a.Fragment,null,React.createElement(t.BaseControl,null,React.createElement(t.ControlWrapper,{orientation:"horizontal"},React.createElement(t.ControlLabel,{label:(0,c.__)("Min","quillforms")}),React.createElement(t.TextControl,{type:"number",value:s,onChange:e=>{isNaN(e)||l({min:e})}}))),React.createElement(t.BaseControl,null,React.createElement(t.ControlWrapper,{orientation:"horizontal"},React.createElement(t.ControlLabel,{label:(0,c.__)("Max","quillforms")}),React.createElement(t.TextControl,{type:"number",value:u,onChange:e=>{isNaN(e)||l({max:e})}}))),React.createElement(t.BaseControl,null,React.createElement(t.ControlWrapper,{orientation:"horizontal"},React.createElement(t.ControlLabel,{label:(0,c.__)("Step","quillforms")}),React.createElement(t.TextControl,{type:"number",value:p,onChange:e=>{isNaN(e)||l({step:e})}}))),React.createElement(t.BaseControl,null,React.createElement(t.ControlWrapper,{orientation:"horizontal"},React.createElement(t.ControlLabel,{label:(0,c.__)("Marks","quillforms")}),React.createElement(t.SelectControl,{value:m.find((e=>e.key===f)),onChange:e=>{e&&e.selectedItem&&l({marks:e.selectedItem.key})},options:m})),"custom"===f&&React.createElement(React.Fragment,null,E.map(((a,m)=>React.createElement("div",{className:"admin-components-choices-inserter__choice-row",key:m},React.createElement(t.TextControl,{type:"number",value:a.value,onChange:e=>C(m,"value",e),placeholder:(0,c.__)("value","quillforms")}),React.createElement(t.TextControl,{type:"text",value:a.label,onChange:e=>C(m,"label",e),placeholder:(0,c.__)("label","quillforms")}),React.createElement("div",{className:"admin-components-choices-inserter__choice-actions"},React.createElement("div",{className:"admin-components-choices-inserter__choice-add"},React.createElement(r.Icon,{icon:n,onClick:()=>(t=>{l({customMarks:[...e.customMarks.slice(0,t),{label:"",value:""},...e.customMarks.slice(t)]})})(m+1)})),E.length>1&&React.createElement("div",{className:"admin-components-choices-inserter__choice-remove"},React.createElement(r.Icon,{className:i.css`
								fill: #fff;
							`,icon:o,onClick:()=>(e=>{const t=[...E];t.splice(e,1),l({customMarks:t})})(m)})))))))),React.createElement(t.BaseControl,null,React.createElement(t.ControlWrapper,{orientation:"horizontal"},React.createElement(t.ControlLabel,{label:(0,c.__)("Prefix","quillforms")}),React.createElement(t.TextControl,{value:d,onChange:e=>l({prefix:e})}))),React.createElement(t.BaseControl,null,React.createElement(t.ControlWrapper,{orientation:"horizontal"},React.createElement(t.ControlLabel,{label:(0,c.__)("Suffix","quillforms")}),React.createElement(t.TextControl,{value:h,onChange:e=>l({suffix:e})}))))},title:(0,c.__)("Slider","quillforms"),order:6.5},{name:s}={name:"slider",supports:{editable:!0,required:!0,attachment:!0,description:!0,logic:!0,defaultValue:!0,theme:!0,numeric:!0,payments:!0},attributes:{min:{type:"number",default:0},max:{type:"number",default:100},step:{type:"number",default:10},prefix:{type:"string",default:""},suffix:{type:"string",default:""},marks:{type:"string",default:"no"},customMarks:{type:"array",default:[{label:"",value:""}]}},logicalOperators:["is","is_not","greater_than","lower_than"]};(0,e.setBlockAdminSettings)(s,m),(window.qf=window.qf||{}).blocklibSliderBlockAdmin={}})();