import{j as B,k as o,C as D,z as N,s as R,J as z,r as A,c as m,a as e,b as M,w as q,m as h,v as w,x as Q,i as T,t as C,y as W,F as J,u as O,d as K,e as X,o as f,D as Y}from"./index-5dca7a6a.js";import{g as Z,a as ee,p as V,Q as te,r as ae}from"./apiFrom-e81977dd.js";/* empty css */import{c as se,p as oe,b as ne}from"./api-2fe5baa7.js";const le={class:"page-wrapper",id:"app","data-layout":"horizontal","data-navbarbg":"skin6","data-sidebartype":"full","data-sidebar-position":"fixed","data-header-position":"fixed"},ie=K('
Generating ...
"),i.value=!0;try{await ne.post("https://avindev.com/bot/public/drawise",{text:b.value+" in HTML Format only "}).then(t=>{console.log(t.data.text),n.value.setHTML(t.data.text),i.value=!1}).catch(()=>{n.value.setHTML("Failed
"),i.value=!1})}catch(t){console.error("Error:",t)}},H=z(()=>k.value.filter(t=>t.selected).map(t=>t.id)),P=async t=>{(await ae)(`/create_site/images/${t}`).then(a=>{console.log(a.data),d.go(0)}).catch(()=>{d.go(0)})};return(t,a)=>{const p=A("RouterLink");return f(),m("div",le,[ie,e("div",ce,[e("div",de,[e("div",re,[e("div",ue,[e("div",pe,[M(p,{to:`../../../dash/${r.value}/pages`,class:"btn btn-outline-warning py-8 mb-4 rounded-2"},{default:q(()=>[ve,T(" Back To Pages")]),_:1},8,["to"]),e("div",_e,[e("div",ge,[e("div",me,[h(e("input",{type:"text",class:"form-control",placeholder:"Username","onUpdate:modelValue":a[0]||(a[0]=s=>g.value=s)},null,512),[[w,g.value]]),he]),fe,be,e("div",ye,[e("div",xe,[e("div",ke,[M(Q(te),{ref_key:"quill",ref:n,content:I.value,"onUpdate:content":a[1]||(a[1]=s=>I.value=s),theme:"snow"},null,8,["content"])]),e("div",we,[e("div",Te,[e("div",Ce,[Ie,h(e("textarea",{"onUpdate:modelValue":a[2]||(a[2]=s=>b.value=s),class:"form-control mb-4",rows:"10",placeholder:`Ex: Write SEO optimized marketing copy for blogs,\r Facebook ads, Google Ads and more to increase clicks,\r conversions and sales.`},null,512),[[w,b.value]]),e("button",{onClick:E,type:"button",disabled:i.value,class:"justify-content-center w-100 btn mb-1 btn-rounded btn-danger d-flex align-items-center"},[Fe,T(" "+C(i.value?"Generating ...":"Generate"),1)],8,Le)])])]),Me,Ve,h(e("input",{"onUpdate:modelValue":a[3]||(a[3]=s=>x.value=s),type:"text",class:"form-control",id:"nametext","aria-describedby":"name",placeholder:"Type your imagination"},null,512),[[w,x.value]]),e("button",{disabled:c.value,onClick:U,class:"btn btn-primary mt-3"},C(u.value),9,Ge),S.value?(f(),m("p",je,"Wait for image generation ...")):W("",!0),Se,e("input",{class:"form-control mb-4",type:"file",id:"formFile",ref_key:"imageInput",ref:F,onChange:$,accept:"image/*"},null,544),e("div",Ue,[e("fieldset",$e,[(f(!0),m(J,null,O(k.value,s=>(f(),m("div",{key:s,class:"checkbox"},[e("label",Ee,[h(e("input",{type:"checkbox",class:"checkbox-input","onUpdate:modelValue":l=>s.selected=l},null,8,He),[[Y,s.selected]]),e("span",Pe,[e("img",{src:`https://api.drawise.net${s.image}`,alt:"",style:{"max-width":"150px"}},null,8,Be),e("button",{onClick:l=>P(s.id),class:"btn btn-outline-danger btn-sm p-1 m-1"},Re,8,De)])])]))),128))])]),e("div",ze,[e("button",{onClick:j,type:"button",disabled:v.value,class:"justify-content-center btn mb-1 btn-rounded btn-success"},[qe,T(" "+C(_.value),1)],8,Ae)])])])])])])])])])])])}}});export{Xe as default};