send_settings_page = ({
  req,
  res,
  main_section,
  main_section_href,
  sub_sections,
  active_sub,
  contents,
  headers,
  no_nav_pills,
  sub2_page,
  page_title,
}) => {
  const pillCard = no_nav_pills
    ? []
    : [
        {
          type: "card",
          class: "mt-0",
          contents: div(
            { class: "d-flex" },
            ul(
              { class: "nav nav-pills plugin-section" },
              sub_sections.map(({ text, href }) =>
                li(
                  { class: "nav-item" },
                  a(
                    {
                      href,
                      class: ["nav-link", active_sub === text && "active"],
                    },
                    req.__(text)
                  )
                )
              )
            )
          ),
        },
      ];
  // headers
  const pg_title = page_title || req.__(active_sub);
  const title = headers
    ? {
        title: pg_title,
        headers,
      }
    : pg_title;
  res.sendWrap(title, {
    above: [
      {
        type: "breadcrumbs",
        crumbs: [
          { text: req.__("Settings"), href: "/settings" },
          { text: req.__(main_section), href: main_section_href },
          {
            text: req.__(active_sub),
            href: sub2_page
              ? sub_sections.find((subsec) => subsec.text === active_sub).href
              : null,
          },
          ...(sub2_page
            ? [
                {
                  text: sub2_page,
                },
              ]
            : []),
        ],
      },
      ...pillCard,
      contents,
    ],
  });
}
Send Settings Page
@param {object} opts
@param {*} opts.req,
@param {*} opts.res,
@param {*} opts.main_section,
@param {*} opts.main_section_href,
@param {*} opts.sub_sections,
@param {*} opts.active_sub,
@param {*} opts.contents,
@param {*} opts.headers,
@param {*} opts.no_nav_pills,
@param {*} opts.sub2_page,