<script setup lang="ts">
// ---------------------------------------------------------------------
// 🔒 AUTOGENERATED @synergy-design-system/vue wrappers for @synergy-design-system/components
// Please do not edit this file directly!
// It will get recreated when running pnpm build.
// ---------------------------------------------------------------------

/**
 * @summary Breadcrumbs provide a group of links so users can easily navigate a website's hierarchy.
 * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-breadcrumb--docs
 * @status stable
 * @since 1.26.0
 *
 * @slot - One or more breadcrumb items to display.
 * @slot separator - The separator to use between breadcrumb items. Works best with `<syn-icon>`.
 *
 * @dependency syn-icon
 *
 * @csspart base - The component's base wrapper.
 */
import { computed, ref } from 'vue';
import '@synergy-design-system/components/components/breadcrumb/breadcrumb.js';

import type SynBreadcrumb from '@synergy-design-system/components/components/breadcrumb/breadcrumb.component.js';

// DOM Reference to the element
const nativeElement = ref<SynBreadcrumb>();

defineExpose({
  nativeElement,
});

// Map attributes
const props = defineProps<{
  /**
* The label to use for the breadcrumb control.
* This will not be shown on the screen, but it will be announced by
screen readers and other assistive devices to provide more context for users.
 */
  label?: SynBreadcrumb['label'];
}>();

// Make sure prop binding only forwards the props that are actually there.
// This is needed because :param="param" also adds an empty attribute
// when using web-components, which breaks optional arguments like size in SynInput
// @see https://github.com/vuejs/core/issues/5190#issuecomment-1003112498
const visibleProps = computed(() =>
  Object.fromEntries(
    Object.entries(props).filter(([, value]) => typeof value !== 'undefined'),
  ),
);
</script>

<template>
  <syn-breadcrumb v-bind="visibleProps" ref="nativeElement">
    <slot></slot>
  </syn-breadcrumb>
</template>
