import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
import style from "./styles/customfooter.scss"
import btnstyle from "./styles/buttons8831.scss"
import FooterLinksConstructor from "./Footer_links"
import Btn8831Constructor from "./Btn8831"

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

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

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

  CustomFooter.css = style + btnstyle
  return CustomFooter
}) satisfies QuartzComponentConstructor
