import { aw as head, au as escape_html, ao as store_get, aq as unsubscribe_stores } from './index2-BLq4EEng.js';
import { g as goto } from './client-dJTdv51U.js';
import { p as page } from './stores-CVemzLCH.js';
import { B as Button } from './Button-DmE4ENkb.js';
import './root-Ce8FGAoU.js';
import './index-L-OMOXY-.js';
import './state.svelte-DCKkPJr6.js';

/* empty css                                                     */
function _error($$renderer, $$props) {
  $$renderer.component(($$renderer2) => {
    var $$store_subs;
    head("1j96wlh", $$renderer2, ($$renderer3) => {
      $$renderer3.title(($$renderer4) => {
        $$renderer4.push(`<title>Error - Shooter</title>`);
      });
    });
    $$renderer2.push(`<main class="error-page svelte-1j96wlh"><div class="error-content svelte-1j96wlh"><div class="error-code svelte-1j96wlh">${escape_html(store_get($$store_subs ??= {}, "$page", page).status)}</div> <h1 class="error-title svelte-1j96wlh">`);
    if (store_get($$store_subs ??= {}, "$page", page).status === 404) {
      $$renderer2.push("<!--[0-->");
      $$renderer2.push(`Page not found`);
    } else {
      $$renderer2.push("<!--[-1-->");
      $$renderer2.push(`Something went wrong`);
    }
    $$renderer2.push(`<!--]--></h1> <p class="error-message svelte-1j96wlh">`);
    if (store_get($$store_subs ??= {}, "$page", page).error?.message) {
      $$renderer2.push("<!--[0-->");
      $$renderer2.push(`${escape_html(store_get($$store_subs ??= {}, "$page", page).error.message)}`);
    } else if (store_get($$store_subs ??= {}, "$page", page).status === 404) {
      $$renderer2.push("<!--[1-->");
      $$renderer2.push(`The page you're looking for doesn't exist or has been moved.`);
    } else {
      $$renderer2.push("<!--[-1-->");
      $$renderer2.push(`An unexpected error occurred. Try refreshing or going back.`);
    }
    $$renderer2.push(`<!--]--></p> <div class="error-actions svelte-1j96wlh">`);
    Button($$renderer2, {
      text: "Go Home",
      classes: "btn-primary",
      onclick: () => void goto()
    });
    $$renderer2.push(`<!----> `);
    Button($$renderer2, {
      text: "Go Back",
      classes: "btn-secondary",
      onclick: () => {
        history.back();
      }
    });
    $$renderer2.push(`<!----></div></div></main>`);
    if ($$store_subs) unsubscribe_stores($$store_subs);
  });
}

export { _error as default };
//# sourceMappingURL=_error.svelte-r3eJvFdN.js.map
