<script setup>
import { computed } from "vue";
import ShwfedActions from "../../../../actions/components/group.vue";
import { registerRowVariables } from "./schema";
defineOptions({ name: "ShwfedTableActionsRendererRuntime" });
const props = defineProps({
  column: { type: null, required: true },
  ctx: { type: Object, required: true }
});
const config = computed(() => ({
  kind: "shwfed.component.action",
  size: "sm",
  gap: props.column.gap,
  style: props.column.style || "display: flex; width: 100%; height: 100%; align-items: center; justify-content: center;",
  groups: props.column.groups.map((group) => ({
    ...group,
    variant: group.variant ?? "link"
  })),
  items: props.column.items
}));
</script>

<template>
  <ShwfedActions
    :config="config"
    :configure="registerRowVariables"
  />
</template>
