export function getSlotsApiDefinitions(params) {
  const {
    componentSlots,
    slotDescriptions,
    componentName
  } = params;
  if (!componentSlots) {
    return [];
  }
  return componentSlots.map(({
    class: className,
    name,
    default: defaultValue
  }) => {
    return {
      description: slotDescriptions?.[name],
      className,
      name,
      defaultValue,
      hash: `${componentName}-css-${className ?? name}`
    };
  });
}
export const getSlotsToc = ({
  slots,
  t,
  hash
}) => !slots || slots.length === 0 ? [] : [{
  text: t('api-docs.slots'),
  hash: hash ?? 'slots',
  children: [...slots.map(({
    name,
    hash: slotHash
  }) => ({
    text: name,
    hash: slotHash,
    children: []
  }))]
}];