import{f as s,j as r,e,F as m}from"./main-few-lands-burn.js";import{a as b}from"./useflows-BpG3C9m1.js";import{M as o}from"./mixinput-CX5xeb4d.js";import{c as T}from"./mutative-C6xjlr6O.js";import{A as v}from"./appheade-BErcWjPn.js";import{T as p}from"./index-ubWv-fhI.js";import{S as g}from"./index-BcDJZYeX.js";import"./lodash-YpNkAOPN.js";import"./index-Budcgb8A.js";import"./index-CyNIBchZ.js";import"./usedebou-9GKFiQAC.js";import"./utilscss-IoKwGUy7.js";import"./tabpanel-DvU0ks7q.js";import"./index-28_Ul1Wv.js";import"./index-CB2KTxNj.js";import"./useclosa-m-cf8k_D.js";import"./context-Ba3TiTex.js";import"./usebreak-DJkppNCB.js";import"./index-DAhFlZRY.js";import"./index-CTlEl9RP.js";import"./index-Cj8-kItB.js";import"./index-wzUEm29P.js";import"./isobject-D8hieKPs.js";import"./index-Vx_YZd5N.js";import"./index-XyHDR-91.js";import"./index-btcdg7gz.js";import"./flowstat-BxuW8LT8.js";import"./useflows-BbAh-zeS.js";import"./import-Cn4VUyaV.js";import"./paginati-DuhDnQhP.js";import"./index-DkD03DCM.js";import"./index-DLjoOpJs.js";function X({nodeId:n}){const[t,h]=b(n),i=(a,c)=>{h(d=>T(d,l=>{l.states||(l.states={components:[]}),l.states?.imageHelper||(l.states.imageHelper={conversionType:"imageToBase64",value:[]}),l.states.imageHelper[a]=c}))};return s(m,{children:[r(v,{nodeId:n}),s("div",{className:"mb-4",children:[r(p.Text,{className:"mb-2 block",strong:!0,children:e("Conversion Type")}),r(g,{onChange:a=>i("conversionType",a),options:[{label:e("Image to Base64"),value:"imageToBase64"},{label:e("Base64 to Image"),value:"base64ToImage"},{label:e("Resize Image"),value:"resizeImage"},{label:e("Rotate Image"),value:"rotateImage"}],style:{width:"100%"},value:t?.states?.imageHelper?.conversionType||"imageToBase64"})]}),t?.states?.imageHelper?.conversionType!=="resizeImage"&&t?.states?.imageHelper?.conversionType!=="rotateImage"&&r(o,{helperText:t?.states?.imageHelper?.conversionType==="base64ToImage"?e("Enter the base64 encoded image string. The image will be decoded and uploaded to WordPress Media Library."):e("Provide an image URL or file path to convert to base64 format."),label:t?.states?.imageHelper?.conversionType==="base64ToImage"?e("Base64 String"):e("Image Input (URL or File Path)"),onChange:a=>i("value",a),value:t?.states?.imageHelper?.value,wrapperClassName:"mb-3"}),t?.states?.imageHelper?.conversionType==="resizeImage"&&s(m,{children:[r(o,{helperText:e("Enter the image URL or file path to resize"),label:e("Image URL"),onChange:a=>i("imageUrl",a),value:t?.states?.imageHelper?.imageUrl,wrapperClassName:"mb-3"}),r(o,{helperText:e("Target width in pixels. Note: Should not exceed original image width."),label:e("Width"),onChange:a=>i("width",a),value:t?.states?.imageHelper?.width,wrapperClassName:"mb-3"}),r(o,{helperText:e("Target height in pixels. Note: Should not exceed original image height."),label:e("Height"),onChange:a=>i("height",a),value:t?.states?.imageHelper?.height,wrapperClassName:"mb-3"})]}),t?.states?.imageHelper?.conversionType==="rotateImage"&&s(m,{children:[r(o,{helperText:e("Enter the image URL or file path to rotate"),label:e("Image URL"),onChange:a=>i("imageUrl",a),value:t?.states?.imageHelper?.imageUrl,wrapperClassName:"mb-3"}),s("div",{className:"mb-4",children:[r(p.Text,{className:"mb-2 block",strong:!0,children:e("Rotation Degree")}),r(g,{onChange:a=>i("degree",a),options:[{label:e("90° Clockwise"),value:"90"},{label:e("180°"),value:"180"},{label:e("270° Clockwise (90° Counter-clockwise)"),value:"270"}],placeholder:e("Select rotation degree"),style:{width:"100%"},value:t?.states?.imageHelper?.degree}),r(p.Text,{className:"mt-1 block",type:"secondary",children:e("Select the degree to rotate the image")})]})]}),t?.states?.imageHelper?.conversionType==="base64ToImage"&&s(m,{children:[r(o,{helperText:e("The title for the uploaded image. This will be used as the attachment title in WordPress Media Library."),label:e("Title"),onChange:a=>i("title",a),value:t?.states?.imageHelper?.title,wrapperClassName:"mb-3"}),r(o,{helperText:e("Alternative text for accessibility. This describes the image for screen readers and improves SEO."),label:e("Alternative Text"),onChange:a=>i("altText",a),value:t?.states?.imageHelper?.altText,wrapperClassName:"mb-3"}),r(o,{helperText:e("A short caption that will be displayed with the image. This appears as the post excerpt in WordPress."),label:e("Caption"),onChange:a=>i("caption",a),value:t?.states?.imageHelper?.caption,wrapperClassName:"mb-3"}),r(o,{helperText:e("A detailed description of the image content. This will be stored as the post content in WordPress."),label:e("Description"),onChange:a=>i("description",a),value:t?.states?.imageHelper?.description,wrapperClassName:"mb-3"})]})]})}export{X as default};
