---
import DefaultLayout from '@/layouts/DefaultLayout.astro';

type Patent = {
  title: string;
  faculty: string;
  status: string;
  jurisdiction: string;
  source: string;
};

const patents: Patent[] = [
  {
    title: 'System for augmentative and alternative communication for people with severe speech and motor disabilities',
    faculty: 'Yogesh Kumar Meena',
    status: 'Indian Patent No. 340756, February 27, 2020',
    jurisdiction: 'India',
    source: 'https://iitgn.ac.in/faculty/cogs/fac-yogesh',
  },
  {
    title: 'Electronic Voting Machine (EVM)',
    faculty: 'Rajat Moona',
    status: 'Granted, application no. 201841002146, January 2022',
    jurisdiction: 'India',
    source: 'https://iitgn.ac.in/faculty/cse/fac-rajat-moona',
  },
  {
    title: 'Portable computer printer',
    faculty: 'Rajat Moona',
    status: 'Indian Patent No. 212999, December 2007',
    jurisdiction: 'India',
    source: 'https://iitgn.ac.in/faculty/cse/fac-rajat-moona',
  },
  {
    title: 'Compiling memory dereferencing instructions from software to hardware in an electronic design',
    faculty: 'Rajat Moona',
    status: 'US Patent No. 7203912, April 2007; Indian Patent No. 242517, August 2010',
    jurisdiction: 'US / India',
    source: 'https://iitgn.ac.in/faculty/cse/fac-rajat-moona',
  },
  {
    title: 'Methods and systems for secured access to devices and systems',
    faculty: 'Rajat Moona',
    status: 'US Patent No. 7864987, January 2011',
    jurisdiction: 'US',
    source: 'https://iitgn.ac.in/faculty/cse/fac-rajat-moona',
  },
  {
    title: 'Method and system for using personal devices for authentication and service access at service outlets',
    faculty: 'Rajat Moona',
    status: 'US Patent No. 8713655, April 2014',
    jurisdiction: 'US',
    source: 'https://iitgn.ac.in/faculty/cse/fac-rajat-moona',
  },
  {
    title: 'Using personal devices for authentication and service access at offline service outlets',
    faculty: 'Rajat Moona',
    status: 'Applied for Indian Patent, application no. 1018/DEL/2008, April 2008',
    jurisdiction: 'India',
    source: 'https://iitgn.ac.in/faculty/cse/fac-rajat-moona',
  },
  {
    title: 'Voter Verified Paper Audit Trail (VVPAT) System',
    faculty: 'Rajat Moona',
    status: 'Applied, application no. 201841010850, March 2018',
    jurisdiction: 'India',
    source: 'https://iitgn.ac.in/faculty/cse/fac-rajat-moona',
  },
];
---

<DefaultLayout title="Patents" description="Intellectual property and technology transfer.">
  <section class="border-b bg-muted/40">
    <div class="container py-14 md:py-18">
      <p class="text-sm font-medium text-secondary">
        Department of Computer Science &amp; Engineering, IIT Gandhinagar
      </p>
      <div class="mt-5 max-w-3xl">
        <h1 class="text-3xl font-semibold leading-tight md:text-5xl">
          Patents
        </h1>
        <p class="mt-5 text-lg leading-relaxed text-muted-foreground">
          Selected publicly listed patents and patent applications involving CSE
          faculty. Entries link back to the faculty profile pages where the
          patent information is listed.
        </p>
      </div>
    </div>
  </section>

  <section class="section-padding">
    <div class="container">
      <div class="grid gap-4 md:grid-cols-2">
        {
          patents.map((patent) => (
            <article class="rounded-lg border border-border bg-card p-5 shadow-sm">
              <div class="flex flex-wrap items-center gap-2">
                <span class="rounded-full bg-secondary/10 px-3 py-1 text-xs font-medium text-secondary">
                  {patent.jurisdiction}
                </span>
              </div>
              <h2 class="mt-4 text-xl font-semibold">{patent.title}</h2>
              <dl class="mt-4 space-y-3 text-sm">
                <div>
                  <dt class="font-medium">Faculty</dt>
                  <dd class="mt-1 text-muted-foreground">{patent.faculty}</dd>
                </div>
                <div>
                  <dt class="font-medium">Status</dt>
                  <dd class="mt-1 text-muted-foreground">{patent.status}</dd>
                </div>
              </dl>
              <a
                href={patent.source}
                class="mt-5 inline-flex text-sm font-medium text-primary underline-offset-4 hover:underline"
                target="_blank"
                rel="noreferrer"
              >
                Source profile -&gt;
              </a>
            </article>
          ))
        }
      </div>
    </div>
  </section>
</DefaultLayout>
