import{j as H,k as o,C as q,z as B,s as D,J as R,r as z,c as w,a as e,b as P,w as A,m as _,v as k,x as L,i as I,t as h,F as N,u as Q,d as J,e as O,o as T,D as W}from"./index-b3134325.js";import{g as K,p as X,Q as Y,r as Z}from"./apiFrom-f56e1afe.js";/* empty css */import{c as ee,a as te,p as F}from"./api-04371953.js";const ae={class:"page-wrapper",id:"app","data-layout":"horizontal","data-navbarbg":"skin6","data-sidebartype":"full","data-sidebar-position":"fixed","data-header-position":"fixed"},se=J('
Generating ...
"),i.value=!0;try{F("/SitePages/gpt",{request:f.value}).then(t=>{console.log(t.data),n.value.setHTML(t.data),i.value=!1}).catch(()=>{n.value.setHTML("Failed
"),i.value=!1})}catch(t){console.error("Error:",t)}},U=R(()=>y.value.filter(t=>t.selected).map(t=>t.id)),$=async t=>{(await Z)(`/SitePages/image/${t}`).then(a=>{console.log(a.data),g.go(0)}).catch(()=>{g.go(0)})};return(t,a)=>{const r=z("RouterLink");return T(),w("div",ae,[se,e("div",oe,[e("div",ne,[e("div",le,[e("div",ie,[e("div",ce,[P(r,{to:`../../../dash/${d.value}/pages`,class:"btn btn-outline-warning py-8 mb-4 rounded-2"},{default:A(()=>[de,I(" Back To Pages")]),_:1},8,["to"]),e("div",re,[e("div",ue,[e("div",pe,[_(e("input",{type:"text",class:"form-control",placeholder:"Username","onUpdate:modelValue":a[0]||(a[0]=s=>m.value=s)},null,512),[[k,m.value]]),ve]),ge,me,e("div",_e,[e("div",he,[e("div",fe,[P(L(Y),{ref_key:"quill",ref:n,content:S.value,"onUpdate:content":a[1]||(a[1]=s=>S.value=s),theme:"snow"},null,8,["content"])]),e("div",be,[e("div",ye,[e("div",xe,[we,_(e("textarea",{"onUpdate:modelValue":a[2]||(a[2]=s=>f.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),[[k,f.value]]),e("button",{onClick:G,type:"button",disabled:i.value,class:"justify-content-center w-100 btn mb-1 btn-rounded btn-danger d-flex align-items-center"},[Ie,I(" "+h(i.value?"Generating ...":"Generate"),1)],8,ke)])])]),Te,Se,_(e("input",{"onUpdate:modelValue":a[3]||(a[3]=s=>b.value=s),type:"text",class:"form-control",id:"nametext","aria-describedby":"name",placeholder:"Type your imagination"},null,512),[[k,b.value]]),e("button",{disabled:v.value,onClick:j,class:"btn btn-primary mt-3"},h(x.value),9,Ce),e("p",null,h(v.value?"Creating images with AI tools may take few minutes. please do not refresh the page":""),1),Pe,e("input",{class:"form-control mb-4",type:"file",id:"formFile",ref_key:"imageInput",ref:C,onChange:E,accept:"image/*"},null,544),e("div",Le,[e("fieldset",Fe,[(T(!0),w(N,null,Q(y.value,s=>(T(),w("div",{key:s,class:"checkbox"},[e("label",Me,[_(e("input",{type:"checkbox",class:"checkbox-input","onUpdate:modelValue":l=>s.selected=l},null,8,Ve),[[W,s.selected]]),e("span",je,[e("img",{src:`${s}`,alt:"",style:{"max-width":"150px"}},null,8,Ee),e("button",{onClick:a[4]||(a[4]=l=>$(L(c))),class:"btn btn-outline-danger btn-sm p-1 m-1"},Ue)])])]))),128))])]),e("div",$e,[e("button",{onClick:V,type:"button",disabled:u.value,class:"justify-content-center btn mb-1 btn-rounded btn-success"},[qe,I(" "+h(p.value),1)],8,He)])])])])])])])])])])])}}});export{Qe as default};