{# API #}
{%- set props = props | default([]) -%}
{%- set _fullWidthMode = props.fullWidthMode | default(null)  -%}
{%- set _elementType = props.elementType | default('div') -%}
{%- set _placement = props.placement | default('bottom-start') -%}
{%- set _id = props.id -%}

{# Class names #}
{%- set _rootClassName = _spiritClassPrefix ~ 'DropdownPopover' -%}

{# Attributes #}
{%- set _dataFullWidthModeAttr = _fullWidthMode ? 'data-spirit-fullwidthmode="' ~ _fullWidthMode | escape('html_attr') ~ '"' : null -%}
{%- set _dataPlacementAttr = _placement ? 'data-spirit-placement="' ~ _placement | escape('html_attr') ~ '"' : null -%}
{%- set _idAttr = _id ? 'id="' ~ _id | escape('html_attr') ~ '"' : null -%}

{# Miscellaneous #}
{%- set _styleProps = useStyleProps(props) -%}
{%- set _classNames = [ _rootClassName, _styleProps.className ] -%}
{%- set _mainPropsWithoutReservedAttributes = props | filter((value, prop) => prop not in ['data-spirit-placement', 'id']) -%}

<{{ _elementType }}
    {{ mainProps(_mainPropsWithoutReservedAttributes) }}
    {{ styleProp(_styleProps) }}
    {{ classProp(_classNames) }}
    {{ _dataFullWidthModeAttr | raw }}
    {{ _dataPlacementAttr | raw }}
    {{ _idAttr | raw }}
>
    {%- block content %}{% endblock -%}
</{{ _elementType }}>
