(()=>{"use strict";var t={n:e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o},d:(e,o)=>{for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.wp.blocks,o=window.wp.i18n,n=window.wp.serverSideRender;var a=t.n(n);const l=window.wp.components,i=window.wp.blockEditor,_=window.ReactJSXRuntime,x=JSON.parse('{"UU":"image-to-text/imagetotext-block"}');(0,e.registerBlockType)(x.UU,{edit:function({attributes:t,setAttributes:e}){let n=[];for(let t=0;t<imagetotext_file.length;t++)n.push({label:imagetotext_file[t],value:imagetotext_file[t]});const x=(0,i.useBlockProps)();return(0,_.jsxs)("div",{...x,children:[(0,_.jsx)(a(),{block:"image-to-text/imagetotext-block",attributes:t}),(0,_.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,o.__)("Text","image-to-text"),value:t.text,onChange:t=>e({text:t})}),(0,_.jsxs)(i.InspectorControls,{children:[(0,_.jsxs)(l.PanelBody,{title:(0,o.__)("View","image-to-text"),initialOpen:!1,children:[(0,_.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,o.__)("Text","image-to-text"),value:t.text,onChange:t=>e({text:t})}),(0,_.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,o.__)("alt text","image-to-text"),checked:t.alt,onChange:t=>e({alt:t})}),(0,_.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,o.__)("alt text","image-to-text"),value:t.alt_text,onChange:t=>e({alt_text:t})}),(0,_.jsx)(i.PanelColorSettings,{title:(0,o.__)("Color Settings","image-to-text"),colorSettings:[{value:t.back_color,onChange:t=>e({back_color:t}),label:(0,o.__)("Back Color","image-to-text")},{value:t.font_color,onChange:t=>e({font_color:t}),label:(0,o.__)("Font Color","image-to-text")}]})]}),(0,_.jsxs)(l.PanelBody,{title:(0,o.__)("Font","image-to-text"),initialOpen:!1,children:[(0,_.jsx)(l.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,o.__)("Font Size","image-to-text"),max:100,min:3,value:t.font_size,onChange:t=>e({font_size:t})}),(0,_.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,o.__)("Font file","image-to-text"),value:t.font_file,options:n,onChange:t=>{e({font_file:t})}}),(0,_.jsx)(l.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,o.__)("Font baseline adjust","image-to-text"),max:1.45,min:1.2,step:.01,value:t.vt_mg,onChange:t=>e({vt_mg:t})})]})]})]})}})})();