import { i as require_jsx_runtime, t as useQuery } from "../_libs/react+tanstack__react-query.mjs";
import { h as Link } from "../_libs/@tanstack/react-router+[...].mjs";
import { i as SiteLayout, n as PageTitle, r as Prose, t as PageBody } from "./Layout-mJm59hV1.mjs";
import { i as fetchPublishedJobs } from "./jobs-DK-Pa4Ss.mjs";
//#region node_modules/.nitro/vite/services/ssr/assets/careers.index-CzJyk_xB.js
var import_jsx_runtime = require_jsx_runtime();
function Page() {
	const { data: jobs, isPending, error } = useQuery({
		queryKey: ["jobs", "published"],
		queryFn: fetchPublishedJobs
	});
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SiteLayout, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(PageBody, { children: [
		/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageTitle, { children: "Careers at Art Source International" }),
		/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Prose, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "For more than four decades we have been the caretakers of an extraordinary collection of antique maps, prints and posters on Boulder’s Historic Pearl Street Mall. Our team is small, curious and deeply attached to the material we handle every day." }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "If you love history, craftsmanship and helping people find the one map that means something to them, we would like to hear from you. All openings below are current." })] }),
		/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
			className: "mt-10 space-y-5",
			children: [
				isPending && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
					className: "text-muted-foreground",
					children: "Loading current openings…"
				}),
				error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
					className: "text-destructive",
					children: "We couldn’t load openings right now. Please try again."
				}),
				jobs?.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
					className: "border border-border bg-card p-6",
					children: [
						"There are no openings posted at the moment. We still welcome speculative applications — write to us via the",
						" ",
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
							to: "/contact-us",
							className: "text-maroon underline",
							children: "contact page"
						}),
						"."
					]
				}),
				jobs?.map((job) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("article", {
					className: "border border-border bg-card p-6 shadow-sm",
					children: [
						/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
							className: "flex flex-wrap items-baseline justify-between gap-3",
							children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
								className: "font-display text-2xl text-maroon",
								children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
									to: "/careers/$slug",
									params: { slug: job.slug },
									className: "hover:underline",
									children: job.title
								})
							}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
								className: "text-sm uppercase tracking-wide text-gold-dark",
								children: job.employment_type
							})]
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
							className: "mt-1 text-sm text-muted-foreground",
							children: [
								job.department,
								" · ",
								job.location,
								job.salary_range ? ` · ${job.salary_range}` : ""
							]
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
							className: "mt-3 text-[17px] leading-relaxed text-foreground/90",
							children: job.summary
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
							to: "/careers/$slug",
							params: { slug: job.slug },
							className: "mt-4 inline-block bg-maroon px-5 py-2.5 text-sm uppercase tracking-wide text-primary-foreground hover:bg-maroon-dark",
							children: "View role & apply"
						})
					]
				}, job.id))
			]
		})
	] }) });
}
//#endregion
export { Page as component };
