"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../constants.js"),d=require("../hooks/use-ag-grid-instance.js"),o=require("../utils.js"),H=e.defineComponent({__name:"index",props:{rowHeight:{default:32},height:{default:void 0},minHeight:{default:g.SMALL_HEIGHT},maxHeight:{default:g.LARGER_HEIGHT}},setup(n){const u=n,a=e.useTemplateRef("wrapperContainer"),h=d.useAgGridModalInject(),l=e.ref(o.toHeight(u.minHeight)),s=t=>{const i=a.value?.clientHeight,c=a.value?.querySelector(".ag-body.ag-layout-normal")?.clientHeight;let r=0;!i||!c?r=0:r=i-c,t>u.minHeight-r&&(l.value=`min(${t+r}px,${o.toHeight(u.maxHeight)})`)};return e.watch(()=>h?.agGridBodyHeight?.value,(t,i)=>{t&&(!i||t>i)&&s(t||0)},{immediate:!0}),(t,i)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperContainer",ref:a,style:e.normalizeStyle({minHeight:n.height==="auto"?"unset":e.unref(o.toHeight)(n.minHeight),height:n.height?e.unref(o.toHeight)(n.height):l.value,display:"flex",flexDirection:"column"})},[e.renderSlot(t.$slots,"default")],4))}});exports.default=H;
