import{O as A,ar as o,bj as n}from"./index-ktJf6c6X.js";const E=({onSubmit:t,submitLabel:a="Submit",submitBtnType:c="submit",extraButtons:u=[],disabled:d=!1,visible:p=!0,position:m="sticky",bottom:f=0,left:b=0,right:x,top:y,zIndex:h=99,width:k="100%",height:j,gap:r=8,padding:l="12px 24px",justifyContent:T="flex-end",alignItems:C="center",backgroundColor:q,borderTop:v,backdropFilter:F="blur(100px)",customStyle:N={},className:S,id:$})=>{const i=A().palette.mode==="dark";if(!p)return null;const g=()=>{var e;if(t==="submit"){const s=document.querySelector("form");s?(e=s.requestSubmit)==null||e.call(s):console.warn("No form found to submit")}else typeof t=="function"&&t()},w={position:m,bottom:f,left:b,right:x,top:y,width:k,height:j,zIndex:h,display:"flex",justifyContent:T,alignItems:C,gap:typeof r=="number"?`${r}px`:r,padding:typeof l=="number"?`${l}px`:l,backdropFilter:F,borderTop:v||(i?"1px solid #444":"1px solid #eee"),backgroundColor:q||(i?"rgba(0,0,0,0.8)":"rgba(255,255,255,0.9)"),...N};return o.jsxs("div",{className:S,id:$,style:w,children:[u.map((e,s)=>e.visible===!1?null:o.jsx(n,{btnType:e.btnType,onClick:e.onClick,disabled:e.disabled,children:e.label},s)),t&&o.jsx(n,{btnType:c,onClick:g,disabled:d,children:a})]})};export{E as F};
