{% import 'elementor/macros' as m %}
{%- set pagination = pagination | default({}) -%}
{%- set classes = settings.classes | merge( [ base_styles.base ] ) | join(' ') -%}
{%- set direction = pagination.direction | default('next') -%}
{%- set disabled_class = pagination.is_disabled ? ' e--disabled' : '' -%}
{%- set is_link = pagination.has_context and not pagination.is_disabled -%}
<a class="{{ classes }}{{ disabled_class }} {{ editor_classes | default('') }}"
	{{- ' ' }}{{ m.render_data_attributes(id, type, interaction_id) }}
	aria-label="{{ pagination.aria_label|e('html_attr') }}"
	{%- if pagination.aria_controls %} aria-controls="{{ pagination.aria_controls|e('html_attr') }}"{% endif %}
	{%- if is_link %}
	href="{{ pagination.href|e('html_attr') }}"
	data-e-pagination-link
	{%- else %}
	aria-disabled="true"
	tabindex="-1"
	{%- endif %}
	data-e-pagination="{{ direction }}"
	{{- m.render_custom_attributes(settings, editor_attributes) }}>
	<!-- elementor-children-placeholder -->
</a>
