import { c as bind_props, b as attr, d as attr_style } from './index2-CzosXNJA.js';

function Popper($$renderer, $$props) {
  $$renderer.component(($$renderer2) => {
    let {
      referenceEl = null,
      placement = "bottom-start",
      offset = [0, 2],
      flip = true,
      preventOverflow = true,
      children
    } = $$props;
    function update() {
    }
    $$renderer2.push(`<div class="popper svelte-1dn0eza">`);
    children($$renderer2);
    $$renderer2.push(`<!----></div>`);
    bind_props($$props, { update });
  });
}
function Dropdown($$renderer, $$props) {
  $$renderer.component(($$renderer2) => {
    let {
      open = false,
      anchorEl = null,
      id = "",
      placement = "bottom-start",
      offset = [0, 2],
      flip = true,
      preventOverflow = true,
      onClose = () => {
      },
      children
    } = $$props;
    if (open && anchorEl) {
      $$renderer2.push("<!--[-->");
      {
        let children2 = function($$renderer3) {
          $$renderer3.push(`<div${attr("id", id)} class="popover svelte-1fd3ybn" role="dialog" aria-modal="true"><div${attr("id", id)} class="popover svelte-1fd3ybn" role="dialog" aria-modal="true"${attr_style(`min-width:${anchorEl?.offsetWidth ?? 0}px`)}>`);
          children2($$renderer3);
          $$renderer3.push(`<!----></div></div>`);
        };
        Popper($$renderer2, {
          referenceEl: anchorEl,
          placement,
          offset,
          flip,
          preventOverflow,
          children: children2,
          $$slots: { default: true }
        });
      }
    } else {
      $$renderer2.push("<!--[!-->");
    }
    $$renderer2.push(`<!--]-->`);
  });
}

export { Dropdown as D };
//# sourceMappingURL=Dropdown-CJ9m5usm.js.map
