/**
 * Code Connect mapping for MPagination
 * Links Figma Pagination (ADS2) to @mozaic-ds/vue
 */
import figma, { html } from '@figma/code-connect/html';

figma.connect(
  'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=6-11558',
  {
    props: {
      compact: figma.enum('Compact mode', {
        True: true,
        False: false,
      }),
    },
    example: ({ compact }) =>
      html`<script setup>
          import { MPagination } from '@mozaic-ds/vue';
        </script>

        <MPagination
          id="pagination-id"
          :model-value="1"
          :compact=${compact}
          :options="[
          { text: 'Page 1 of 99', value: 1 },
          { text: 'Page 2 of 99', value: 2 },
          { text: 'Page 99 of 99', value: 99 },
        ]"
          select-label="Select page"
          aria-label="pagination"
        ></MPagination>`,
  },
);
