globalThis.process ??= {}; globalThis.process.env ??= {};
import { e as createComponent, f as createAstro, l as renderHead, r as renderTemplate } from '../chunks/astro/server_WO3f6Mge.mjs';
import { r as resolveShortLink } from '../chunks/shortlink_FrzJzDij.mjs';
export { r as renderers } from '../chunks/_@astro-renderers_DpxbEuk7.mjs';

const $$Astro = createAstro();
const $$shortcode = createComponent(async ($$result, $$props, $$slots) => {
  const Astro2 = $$result.createAstro($$Astro, $$props, $$slots);
  Astro2.self = $$shortcode;
  const { shortcode } = Astro2.params;
  if (!shortcode) {
    return Astro2.redirect("/app");
  }
  const fullUrl = await resolveShortLink(shortcode);
  if (fullUrl) {
    return Astro2.redirect(fullUrl);
  }
  return renderTemplate`<html> <head><title>Link Not Found</title>${renderHead()}</head> <body> <h1>Link not found</h1> <p>This shortcode does not exist.</p> <a href="/app">Go to Dashboard Builder</a> </body></html>`;
}, "/home/fc/Projects/glance/src/pages/[shortcode].astro", void 0);

const $$file = "/home/fc/Projects/glance/src/pages/[shortcode].astro";
const $$url = "/[shortcode]";

const _page = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
    __proto__: null,
    default: $$shortcode,
    file: $$file,
    url: $$url
}, Symbol.toStringTag, { value: 'Module' }));

const page = () => _page;

export { page };
