"use client";

import Link from "next/link";
import { Briefcase, MapPin, Clock, ArrowRight } from "lucide-react";

interface Props {
  id: string;
  title: string;
  department: string;
  location: string;
  type: string;
}

export default function JobCard({ id, title, department, location, type }: Props) {
  return (
    <Link
      href={`/careers/${id}`}
      className="immersive-card group flex items-center justify-between gap-6 p-6 lg:p-7"
    >
      <div className="flex-1">
        <h3 className="font-heading text-lg font-medium tracking-tight transition-colors group-hover:text-[hsl(var(--primary))] lg:text-xl">
          {title}
        </h3>
        <div className="mt-3 flex flex-wrap gap-x-5 gap-y-2">
          <span className="inline-flex items-center gap-1.5 text-sm text-[hsl(var(--muted-foreground))]">
            <Briefcase className="size-3.5 text-[hsl(var(--primary))]" aria-hidden />
            {department}
          </span>
          <span className="inline-flex items-center gap-1.5 text-sm text-[hsl(var(--muted-foreground))]">
            <MapPin className="size-3.5 text-[hsl(var(--primary))]" aria-hidden />
            {location}
          </span>
          <span className="inline-flex items-center gap-1.5 text-sm text-[hsl(var(--muted-foreground))]">
            <Clock className="size-3.5 text-[hsl(var(--primary))]" aria-hidden />
            {type}
          </span>
        </div>
      </div>

      <span className="flex size-10 shrink-0 items-center justify-center rounded-md bg-[hsl(var(--primary))]/10 text-[hsl(var(--primary))] transition-colors group-hover:bg-[hsl(var(--primary))] group-hover:text-[hsl(var(--primary-foreground))]">
        <ArrowRight className="size-4" aria-hidden />
      </span>
    </Link>
  );
}
