import { webFonts } from './remoteAssets/fonts';

/*
 * Only preload woff2 fonts, since woff1 are only included as fallbacks.
 */
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
export const createFontLinks = () => webFonts.filter(f => f.extensions.includes('woff2')).map(_ref => {
  let {
    filePath
  } = _ref;
  return /*#__PURE__*/_jsx("link", {
    as: "font",
    crossOrigin: "anonymous",
    href: `${filePath}.woff2`,
    rel: "preload",
    type: "font/woff2"
  }, filePath);
});
export const AssetProvider = () => {
  return /*#__PURE__*/_jsx(_Fragment, {
    children: createFontLinks()
  });
};