import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
import style from "./styles/footer.scss"
import FooterLinksConstructor from "./Footer_links"
import Btn8831 from "./Btn8831"

interface Options {
  links: Record<string, string>
  rings: Record<string, string>
}

export default ((opts?: Options) => {
  const FooterLinks = FooterLinksConstructor(opts)

  const CustomFooter: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => {
    return (
      <footer class={`${displayClass ?? ""}`}>
        <FooterLinks displayClass={displayClass} cfg={cfg} />
        <Btn8831 displayClass={displayClass} cfg={cfg} />
      </footer>
    )
  }

  CustomFooter.css = style
  return CustomFooter
}) satisfies QuartzComponentConstructor
