import{d as I,b2 as w,a as L,b3 as R,f as u,h as e,t as C,x as P,v as a,g as n,B as _,i as d,aG as p,aJ as U,bG as x,F as m,y as k,o as r,aO as Z,J,$ as j,A as q,bC as W,_ as Y}from"./BxiWQxwE.js";import H from"./DbZappjS.js";import K from"./CACLnWKE.js";import{_ as Q}from"./4HfP1VOY.js";import{u as X}from"./DV8hZmlQ.js";import"./QMEN6lyk.js";import"./CxeYIrhH.js";const ee={class:"controls"},te={class:"packaging"},oe={for:"file-input",class:"button"},ae={class:"control-buttons"},ne={class:"form-input"},se={for:"text"},le={class:"form-input"},re={for:"font"},ie=["value"],ue={class:"form-input"},de={for:"fontSize"},ce=["value"],_e={class:"form-input"},pe={for:"location"},me=["value"],ke={class:"form-input"},ve={class:"colors"},xe=["aria-label","onClick"],he={class:"clear"},F=.1,be=90,fe=I({__name:"editor-controls",props:{modelValue:{required:!0},modelModifiers:{}},emits:w(["updatePictureCake","clear"],["update:modelValue"]),setup(g,{emit:O}){const{$messages:s}=L(),{photoCakeProduct:i}=X(),S=["24px","36px","48px","60px","72px"],T=["Arial","Comic Sans MS","Tahoma"],V=[s("dekaGebak.editor.top"),s("dekaGebak.editor.bottom")],N=[{name:"Yellow",hex:"#F2C002"},{name:"Pink",hex:"#EF87B2"},{name:"Red",hex:"#D90000"},{name:"Green",hex:"#3DA638"},{name:"Orange",hex:"#FFA500"},{name:"Blue",hex:"#2D348B"},{name:"White",hex:"#FFFFFF"},{name:"Black",hex:"#000000"}],l=R(g,"modelValue"),c=O,B=()=>{l.value.scale+=F,c("updatePictureCake")},A=()=>{l.value.scale-=F,c("updatePictureCake")},D=()=>{l.value.rotation+=be,c("updatePictureCake")};return(ye,o)=>{var b,f,y;const h=Z,G=J,M=H,z=K,$=W,E=Q;return r(),u("div",ee,[e("h2",null,a((b=n(i))==null?void 0:b.headerText)+" "+a((f=n(i))==null?void 0:f.subText),1),e("p",te,a((y=n(i))==null?void 0:y.packaging),1),e("h4",null,[o[5]||(o[5]=e("span",null,"1",-1)),_(" "+a(n(s)("dekaPastry.editor.choosePicture")),1)]),e("label",oe,a(n(s)("dekaPastry.editor.uploadPicture")),1),e("h4",null,[o[6]||(o[6]=e("span",null,"2",-1)),_(" "+a(n(s)("dekaPastry.editor.adjustPicture")),1)]),e("div",ae,[e("button",{"aria-label":"Zoom in",onClick:B},[d(h),e("span",null,[d(G)])]),e("button",{"aria-label":"Zoom uit",onClick:A},[d(h),o[7]||(o[7]=_()),e("span",null,[d(M)])]),e("button",{onClick:D},[d(z)])]),e("h4",null,[o[8]||(o[8]=e("span",null,"3",-1)),_(" "+a(n(s)("dekaPastry.editor.addText")),1)]),e("div",ne,[e("label",se,a(n(s)("dekaPastry.editor.ownText")),1),p(e("input",{id:"text","onUpdate:modelValue":o[0]||(o[0]=t=>l.value.text=t),type:"text",placeholder:"Voeg tekst toe"},null,512),[[U,l.value.text]])]),e("div",le,[e("label",re,a(n(s)("dekaPastry.editor.font")),1),p(e("select",{"onUpdate:modelValue":o[1]||(o[1]=t=>l.value.font=t)},[(r(),u(m,null,k(T,t=>e("option",{key:t,value:t},a(t),9,ie)),64))],512),[[x,l.value.font]])]),e("div",ue,[e("label",de,a(n(s)("dekaPastry.editor.fontSize")),1),p(e("select",{"onUpdate:modelValue":o[2]||(o[2]=t=>l.value.fontSize=t)},[(r(),u(m,null,k(S,t=>e("option",{key:t,value:t},a(t),9,ce)),64))],512),[[x,l.value.fontSize]])]),e("div",_e,[e("label",pe,a(n(s)("dekaPastry.editor.location")),1),p(e("select",{"onUpdate:modelValue":o[3]||(o[3]=t=>l.value.location=t)},[(r(),u(m,null,k(V,(t,v)=>e("option",{key:v,value:v},a(t),9,me)),64))],512),[[x,l.value.location]])]),e("div",ke,[e("label",null,a(n(s)("dekaPastry.editor.color")),1),e("div",ve,[(r(),u(m,null,k(N,t=>e("button",{key:t.hex,class:q({white:t.hex==="#FFFFFF"}),style:j({backgroundColor:t.hex}),"aria-label":t.name,onClick:v=>l.value.color=t.hex},[t.hex===l.value.color?(r(),C($,{key:0})):P("",!0)],14,xe)),64))])]),e("div",he,[e("button",{class:"button-clean",onClick:o[4]||(o[4]=t=>c("clear"))},a(n(s)("dekaPastry.editor.undo")),1)]),e("p",null,a(n(s)("dekaPastry.editor.moreCakes")),1),n(i)?(r(),C(E,{key:0,product:n(i)},null,8,["product"])):P("",!0)])}}}),Ve=Y(fe,[["__scopeId","data-v-2e73b91e"]]);export{Ve as default};
