import{S as h,i as k,s as v,e as g,I as _,a as c,b as y,g as p,c as C,q as d,j as w,G as M,u as j,v as q,x as u,y as m,z,m as S,t as f,A,B as D,C as E}from"./index.bbdd6a1e.js";function G(i){let e,n,a,l,s;return{c(){e=g("button"),n=g("img"),_(n.src,a=i[0])||c(n,"src",a),c(n,"alt",i[1]),c(n,"class","m-t-1 w-[60%] h-[60%] opacity-60"),c(e,"class","text-gray-500 bg-white/90 h-5 w-5 flex items-center justify-center rounded shadow-sm hover:shadow-xl hover:ring-1 ring-inset ring-gray-200 z-10")},m(t,r){y(t,e,r),p(e,n),l||(s=C(e,"click",i[2]),l=!0)},p(t,[r]){r&1&&!_(n.src,a=t[0])&&c(n,"src",a),r&2&&c(n,"alt",t[1])},i:d,o:d,d(t){t&&w(e),l=!1,s()}}}function U(i,e,n){let{image:a}=e,{alt:l=""}=e;function s(t){M.call(this,i,t)}return i.$$set=t=>{"image"in t&&n(0,a=t.image),"alt"in t&&n(1,l=t.alt)},[a,l,s]}class I extends h{constructor(e){super(),k(this,e,U,G,v,{image:0,alt:1})}}var F="./assets/sketch.8ee16a39.svg",H="./assets/clear.88e065e8.svg";function b(i){let e,n;return e=new I({props:{image:F,alt:"edit image"}}),e.$on("click",i[4]),{c(){j(e.$$.fragment)},m(a,l){q(e,a,l),n=!0},p:d,i(a){n||(u(e.$$.fragment,a),n=!0)},o(a){m(e.$$.fragment,a),n=!1},d(a){z(e,a)}}}function J(i){let e,n,a,l,s=i[0]&&b(i);return a=new I({props:{image:H,alt:"clear image"}}),a.$on("click",i[5]),{c(){e=g("div"),s&&s.c(),n=S(),j(a.$$.fragment),c(e,"class","modify-upload z-10 top-2 right-2 justify-end flex gap-1"),f(e,"absolute",i[1]),f(e,"m-1",!i[1])},m(t,r){y(t,e,r),s&&s.m(e,null),p(e,n),q(a,e,null),l=!0},p(t,[r]){t[0]?s?(s.p(t,r),r&1&&u(s,1)):(s=b(t),s.c(),u(s,1),s.m(e,n)):s&&(A(),m(s,1,1,()=>{s=null}),D()),r&2&&f(e,"absolute",t[1]),r&2&&f(e,"m-1",!t[1])},i(t){l||(u(s),u(a.$$.fragment,t),l=!0)},o(t){m(s),m(a.$$.fragment,t),l=!1},d(t){t&&w(e),s&&s.d(),z(a)}}}function K(i,e,n){let{editable:a=!1}=e,{absolute:l=!0}=e,{style:s=""}=e;const t=E(),r=()=>t("edit"),B=()=>t("clear");return i.$$set=o=>{"editable"in o&&n(0,a=o.editable),"absolute"in o&&n(1,l=o.absolute),"style"in o&&n(3,s=o.style)},[a,l,t,s,r,B]}class N extends h{constructor(e){super(),k(this,e,K,J,v,{editable:0,absolute:1,style:3})}}export{I,N as M};
