import{C as e,D as t,I as n,J as r,M as i,P as a,S as o,V as s,W as c,Y as l,_ as u,b as d,dt as f,ft as p,it as m,j as h,l as g,n as _,nt as v,ot as y,q as b,r as x,st as ee,t as S,v as C,w}from"../../client.js";import{C as T,V as E,b as D,u as O}from"../../components.js";import k from"../button/Button.js";import A from"../divider/Divider.js";var j=a(`<span class="mc-file-uploader-item__details svelte-1sb9cm3"><!></span>`),te=a(`<!> <div class="mc-file-uploader-item__actions-container svelte-1sb9cm3"><!></div>`,1),ne=a(`<div class="mc-file-uploader-item__delete-button-container svelte-1sb9cm3"><!></div>`),re=a(`<span class="mc-file-uploader-item__error-message svelte-1sb9cm3"><!></span>`),ie=a(`<div><div><div><span class="mc-file-uploader-item__status-icon svelte-1sb9cm3"><!></span> <div class="mc-file-uploader-item__info-content svelte-1sb9cm3"><span class="mc-file-uploader-item__label svelte-1sb9cm3"><!></span> <!></div></div> <!></div> <!></div>`),ae={hash:`svelte-1sb9cm3`,code:`/**
 * Do not edit directly, this file was auto-generated.
 */.mc-file-uploader.svelte-1sb9cm3 {display:flex;flex-direction:column;gap:1rem;box-sizing:border-box;}.mc-file-uploader__files-list.svelte-1sb9cm3 {display:flex;flex-direction:column;gap:1rem;}.mc-file-uploader__hidden-input.svelte-1sb9cm3 {height:0;width:0;overflow:hidden;position:absolute;top:-1000px;left:-1000px;text-align:left;opacity:0;}.mc-file-uploader__input.svelte-1sb9cm3 {display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:0.5rem;line-height:var(--line-height-s, 1.3);font-weight:var(--font-weight-semi-bold, 600);border-radius:var(--border-radius-m, 0.5rem);color:var(--file-uploader-color-drag-and-drop-text-default, #242938);}.mc-file-uploader__input.svelte-1sb9cm3 .mc-file-uploader__button:where(.svelte-1sb9cm3) {width:100%;}.mc-file-uploader__input--disabled.svelte-1sb9cm3 .mc-file-uploader__button.mc-button.mc-button--outlined:where(.svelte-1sb9cm3) {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-file-uploader__input-title.svelte-1sb9cm3 {height:1.125rem;font-size:var(--font-size-150, 1rem);}.mc-file-uploader__input-subtitle.svelte-1sb9cm3 {height:1.125rem;font-size:var(--font-size-100, 0.875rem);}.mc-file-uploader--draggable.svelte-1sb9cm3 .mc-file-uploader__input:where(.svelte-1sb9cm3) {padding:2rem;outline:0.125rem dashed var(--file-uploader-color-drag-and-drop-border-default, #464e63);display:flex;}.mc-file-uploader--draggable.svelte-1sb9cm3 .mc-file-uploader__input--disabled:where(.svelte-1sb9cm3) {outline-color:var(--file-uploader-color-drag-and-drop-border-disabled, #b3b3b3);color:var(--file-uploader-color-drag-and-drop-text-disabled, #b3b3b3);cursor:not-allowed;}.mc-file-uploader--draggable.svelte-1sb9cm3 .mc-file-uploader__input--dragged:where(.svelte-1sb9cm3) {outline-width:0.25rem;}.mc-file-uploader-item.svelte-1sb9cm3 {display:flex;flex-direction:column;gap:0.25rem;}.mc-file-uploader-item__container.svelte-1sb9cm3 {border:1px solid var(--file-uploader-color-file-item-border-default, #cccccc);border-radius:var(--border-radius-m, 0.5rem);padding:0.75rem;}.mc-file-uploader-item__meta-row.svelte-1sb9cm3 {display:flex;align-items:center;flex-grow:1;}.mc-file-uploader-item__meta-row--with-info.svelte-1sb9cm3 {align-items:start;}.mc-file-uploader-item__status-icon.svelte-1sb9cm3 {fill:var(--file-uploader-color-file-item-icon-valid, #3f9e10);}.mc-file-uploader-item__info-content.svelte-1sb9cm3 {display:flex;flex-direction:column;flex-grow:1;padding-left:0.5rem;padding-right:1rem;}.mc-file-uploader-item__label.svelte-1sb9cm3 {color:var(--file-uploader-color-file-item-text-file-name, #000000);font-size:var(--font-size-100, 0.875rem);line-height:var(--line-height-s, 1.3);font-weight:var(--font-weight-semi-bold, 600);}.mc-file-uploader-item__details.svelte-1sb9cm3 {color:var(--file-uploader-color-file-item-text-information, #666666);font-size:var(--font-size-50, 0.75rem);line-height:var(--line-height-s, 1.3);font-weight:var(--font-weight-regular, 400);}.mc-file-uploader-item__error-message.svelte-1sb9cm3 {color:var(--field-color-validation-invalid, #c61112);font-size:var(--font-size-100, 0.875rem);line-height:var(--line-height-s, 1.3);font-weight:var(--font-weight-regular, 400);}.mc-file-uploader-item__container--inline.svelte-1sb9cm3 {display:flex;align-items:center;}.mc-file-uploader-item__container--stacked.svelte-1sb9cm3 {display:flex;flex-direction:column;gap:0.75rem;}.mc-file-uploader-item__delete-button-container.svelte-1sb9cm3 {padding-left:0.25rem;margin-left:0.25rem;border-left:1px solid var(--divider-color-primary, #cccccc);}.mc-file-uploader-item__actions-container.svelte-1sb9cm3 {padding:0 2rem;display:flex;align-items:center;gap:0.25rem;justify-content:center;}.mc-file-uploader-item__action.svelte-1sb9cm3 {padding:0 0.75rem;flex-grow:1;}.mc-file-uploader-item--error.svelte-1sb9cm3 .mc-file-uploader-item__container:where(.svelte-1sb9cm3) {border-width:var(--border-width-m, 0.125rem);border-color:var(--file-uploader-color-file-item-border-invalid, #ea302d);}.mc-file-uploader-item--error.svelte-1sb9cm3 .mc-file-uploader-item__status-icon:where(.svelte-1sb9cm3) {fill:var(--file-uploader-color-file-item-icon-invalid, #ea302d);}.mc-file-uploader-item--loading.svelte-1sb9cm3 .mc-file-uploader-item__container:where(.svelte-1sb9cm3) {gap:1rem;flex-direction:column;align-items:normal;}.mc-file-uploader-item--loading.svelte-1sb9cm3 .mc-file-uploader-item__status-icon:where(.svelte-1sb9cm3) {fill:var(--color-standalone-disabled, #b3b3b3);}.mc-file-uploader-item--loading.svelte-1sb9cm3 .mc-file-uploader-item__label:where(.svelte-1sb9cm3),
.mc-file-uploader-item--loading.svelte-1sb9cm3 .mc-file-uploader-item__details:where(.svelte-1sb9cm3) {color:var(--color-standalone-disabled, #b3b3b3);}`};function M(a,S){let M=e(S);ee(S,!0),d(a,ae);let N=_(S,`file`,7),P=_(S,`format`,7,`inline`),F=_(S,`valid`,7),I=_(S,`errormessage`,7),L=_(S,`deletebuttonlabel`,7,`Delete`),R=_(S,`information`,7),z=_(S,`ondelete`,7),B=_(S,`class`,7),V=x(S,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`file`,`format`,`valid`,`errormessage`,`deletebuttonlabel`,`information`,`ondelete`,`class`]),H=v(()=>P()===`stacked`),U=v(()=>F()?`default`:`error`),W={default:O,error:E},G=v(()=>W[s(U)]);var K={get file(){return N()},set file(e){N(e),m()},get format(){return P()},set format(e=`inline`){P(e),m()},get valid(){return F()},set valid(e){F(e),m()},get errormessage(){return I()},set errormessage(e){I(e),m()},get deletebuttonlabel(){return L()},set deletebuttonlabel(e=`Delete`){L(e),m()},get information(){return R()},set information(e){R(e),m()},get ondelete(){return z()},set ondelete(e){z(e),m()},get class(){return B()},set class(e){B(e),m()}},q=ie();g(q,()=>({class:[`mc-file-uploader-item`,s(U)!==`default`&&`mc-file-uploader-item--${s(U)}`,B()],...V}),void 0,void 0,void 0,`svelte-1sb9cm3`);var J=b(q),Y=b(J),X=b(Y);o(b(X),()=>s(G),(e,t)=>{t(e,{})}),p(X);var Z=l(X,2),Q=b(Z);w(b(Q),S,`name`,{get file(){return N()}},e=>{var t=n();c(()=>h(t,N().name)),i(e,t)}),p(Q);var oe=l(Q,2),se=e=>{var t=j();w(b(t),S,`information`,{get file(){return N()}},e=>{var t=n();c(()=>h(t,R())),i(e,t)}),p(t),i(e,t)};t(oe,e=>{(R()||M.information)&&e(se)}),p(Z),p(Y);var ce=l(Y,2),le=e=>{var t=te(),a=r(t);A(a,{});var o=l(a,2);k(b(o),{ghost:!0,size:`s`,iconposition:`left`,"aria-label":`Delete file`,get onclick(){return z()},children:(e,t)=>{f();var r=n();c(()=>h(r,L())),i(e,r)},$$slots:{default:!0,icon:(e,t)=>{T(e,{slot:`icon`})}}}),p(o),i(e,t)},$=e=>{var t=ne();k(b(t),{ghost:!0,size:`s`,iconposition:`only`,"aria-label":`Delete file`,get onclick(){return z()},children:(e,t)=>{f();var r=n();c(()=>h(r,L())),i(e,r)},$$slots:{default:!0,icon:(e,t)=>{D(e,{slot:`icon`})}}}),p(t),i(e,t)};t(ce,e=>{s(H)?e(le):e($,-1)}),p(J);var ue=l(J,2),de=e=>{var t=re();w(b(t),S,`errorMessage`,{},e=>{var t=n();c(()=>h(t,I())),i(e,t)}),p(t),i(e,t)};return t(ue,e=>{!F()&&(I()||M.errorMessage)&&e(de)}),p(q),c(()=>{u(J,1,C({"mc-file-uploader-item__container":!0,[`mc-file-uploader-item__container--${P()}`]:!0}),`svelte-1sb9cm3`),u(Y,1,C({"mc-file-uploader-item__meta-row":!0,"mc-file-uploader-item__meta-row--with-info":R()}),`svelte-1sb9cm3`)}),i(a,q),y(K)}customElements.define(`m-file-uploader-item`,S(M,{file:{},format:{},valid:{},errormessage:{},deletebuttonlabel:{},information:{},ondelete:{},class:{}},[`name`,`information`,`errorMessage`],[],{mode:`open`}));export{M as default};
//# sourceMappingURL=FileUploaderItem.js.map