import { f as fallback } from './async-D55cHugf.js';
import { l as element, g as attr_style, d as bind_props, s as slot, a as attr, f as attr_class, i as stringify } from './index-u8mz_F03.js';

/* empty css                                        */function G(q,e){q.component(t=>{let b=fallback(e.height,void 0),g=fallback(e.min_height,void 0),k=fallback(e.max_height,void 0),d=fallback(e.width,void 0),w=fallback(e.elem_id,""),x=fallback(e.elem_classes,()=>[],true),m=fallback(e.variant,"solid"),h=fallback(e.border_mode,"base"),_=fallback(e.padding,true),y=fallback(e.type,"normal"),v=fallback(e.test_id,void 0),p=fallback(e.explicit_call,false),r=fallback(e.container,true),n=fallback(e.visible,true),B=fallback(e.allow_overflow,true),z=fallback(e.overflow_behavior,"auto"),c=fallback(e.scale,null),E=fallback(e.min_width,0),u=fallback(e.flex,false),L=fallback(e.resizable,false),R=fallback(e.rtl,false),a=fallback(e.fullscreen,false),j=fallback(e.label,void 0),C=a,o,A=y==="fieldset"?"fieldset":"div",H=0,K=0,i=null;function W(f){a&&f.key==="Escape"&&(a=false);}const s=f=>{if(f!==void 0){if(typeof f=="number")return f+"px";if(typeof f=="string")return f}};a!==C&&(C=a,a?(i=o.getBoundingClientRect(),H=o.offsetHeight,K=o.offsetWidth,window.addEventListener("keydown",W)):(i=null,window.removeEventListener("keydown",W))),n||(u=false),n===true||n==="hidden"?(t.push("<!--[-->"),element(t,A,()=>{t.push(`${attr("data-testid",v)}${attr("id",w)}${attr_class(`block ${stringify(x?.join(" ")||"")}`,"svelte-1plpy97",{hidden:n==="hidden",padded:_,flex:u,border_focus:h==="focus",border_contrast:h==="contrast","hide-container":!p&&!r,fullscreen:a,animating:a&&i!==null,"auto-margin":c===null})}${attr("dir",R?"rtl":"ltr")}${attr("aria-label",j)}${attr_style("",{height:a?void 0:s(b),"min-height":a?void 0:s(g),"max-height":a?void 0:s(k),"--start-top":i?`${i.top}px`:"0px","--start-left":i?`${i.left}px`:"0px","--start-width":i?`${i.width}px`:"0px","--start-height":i?`${i.height}px`:"0px",width:a?void 0:typeof d=="number"?`calc(min(${d}px, 100%))`:s(d),"border-style":m,overflow:B?z:"hidden","flex-grow":c,"min-width":`calc(min(${E}px, 100%))`})}`);},()=>{t.push("<!--[-->"),slot(t,e,"default",{}),t.push("<!--]--> "),L?(t.push("<!--[-->"),t.push('<svg class="resize-handle svelte-1plpy97" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10"><line x1="1" y1="9" x2="9" y2="1" stroke="gray" stroke-width="0.5" class="svelte-1plpy97"></line><line x1="5" y1="9" x2="9" y2="5" stroke="gray" stroke-width="0.5" class="svelte-1plpy97"></line></svg>')):t.push("<!--[!-->"),t.push("<!--]-->");}),t.push(" "),a?(t.push("<!--[-->"),t.push(`<div class="placeholder svelte-1plpy97"${attr_style("",{height:H+"px",width:K+"px"})}></div>`)):t.push("<!--[!-->"),t.push("<!--]-->")):t.push("<!--[!-->"),t.push("<!--]-->"),bind_props(e,{height:b,min_height:g,max_height:k,width:d,elem_id:w,elem_classes:x,variant:m,border_mode:h,padding:_,type:y,test_id:v,explicit_call:p,container:r,visible:n,allow_overflow:B,overflow_behavior:z,scale:c,min_width:E,flex:u,resizable:L,rtl:R,fullscreen:a,label:j});});}

export { G };
//# sourceMappingURL=Block-DZmzQwnI.js.map
