import{S as h,i as k,s as v,e as g,F as _,a as o,b as y,f as w,l as M,n as d,h as p,D as S,o as q,q as z,u,v as m,w as j,k as B,t as f,x as C,y as E,z as F}from"./index.9fc31042.js";function U(i){let e,n,a,l,s;return{c(){e=g("button"),n=g("img"),_(n.src,a=i[0])||o(n,"src",a),o(n,"alt",i[1]),o(n,"class","m-t-1 w-[60%] h-[60%] opacity-60"),o(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),w(e,n),l||(s=M(e,"click",i[2]),l=!0)},p(t,[r]){r&1&&!_(n.src,a=t[0])&&o(n,"src",a),r&2&&o(n,"alt",t[1])},i:d,o:d,d(t){t&&p(e),l=!1,s()}}}function A(i,e,n){let{image:a}=e,{alt:l=""}=e;function s(t){S.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 D extends h{constructor(e){super(),k(this,e,A,U,v,{image:0,alt:1})}}var G="./assets/edit.8ee16a39.svg",H="./assets/clear.88e065e8.svg";function b(i){let e,n;return e=new D({props:{image:G,alt:"edit image"}}),e.$on("click",i[4]),{c(){q(e.$$.fragment)},m(a,l){z(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){j(e,a)}}}function J(i){let e,n,a,l,s=i[0]&&b(i);return a=new D({props:{image:H,alt:"clear image"}}),a.$on("click",i[5]),{c(){e=g("div"),s&&s.c(),n=B(),q(a.$$.fragment),o(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),w(e,n),z(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&&(C(),m(s,1,1,()=>{s=null}),E()),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&&p(e),s&&s.d(),j(a)}}}function K(i,e,n){let{editable:a=!1}=e,{absolute:l=!0}=e,{style:s=""}=e;const t=F(),r=()=>t("edit"),I=()=>t("clear");return i.$$set=c=>{"editable"in c&&n(0,a=c.editable),"absolute"in c&&n(1,l=c.absolute),"style"in c&&n(3,s=c.style)},[a,l,t,s,r,I]}class N extends h{constructor(e){super(),k(this,e,K,J,v,{editable:0,absolute:1,style:3})}}export{D as I,N as M};
