---
import { t, type Lang } from "@i18n";

type Props = {
  lang: Lang;
  children: any;
};

const { lang } = Astro.props;
const authors = Astro.slots.has("default")
  ? (await Astro.slots.render("default")).replaceAll(/\<\/(a|span)\>\</g, "</$1><br><").split("<br>")
  : [];
---

{
  authors.length ? (
    <p
      id="authors"
      aria-label={t(lang, "story/authors_aria_label", authors)}
      set:html={t(lang, "story/authors", authors)}
    />
  ) : null
}
