/* AI legal research — LexInTosh AI Assistant. */
const { Badge, StatCard, SourceCitation } = window.LexInToshDesignSystem_e187a4;
const Icon = window.Icon;
const SITE = window.SITE;

function ResearchDemo() {
  return (
    <div className="demo">
      <div className="demo__head">
        <span className="demo__title"><Icon name="sparkles" size={15} /> LexInTosh AI</span>
        <Badge variant="secondary" size="sm">Nepal &middot; Civil</Badge>
      </div>
      <div className="demo__q">
        <span className="demo__qk">Q</span>
        <p>What is the limitation period for filing a civil appeal?</p>
      </div>
      <div className="demo__a">
        <p>A civil appeal must be filed within <b>35 days</b> of the date of judgment<sup className="cite">1</sup>. The period runs from the decision date, not the date of knowledge<sup className="cite">2</sup>, and lies to the High Court under its appellate jurisdiction<sup className="cite">3</sup>.</p>
      </div>
      <div className="demo__sources">
        <div className="demo__slabel">Sources &middot; 3 of 47 documents</div>
        <div className="demo__srows">
          <SourceCitation sourceType="Act" title="Muluki Civil Procedure Code, 2074" citationNumber="1" pageLabel="Section 207"
            context="An appeal shall be filed within thirty-five days of the date of the judgment or final order of the court." />
          <SourceCitation sourceType="Najir" title="Bimala Thapa v. Everest Trek Ltd." citationNumber="2"
            metadata={[["NKP Year", "2079"], ["Adda", "Supreme Court"], ["Bench", "Division"]]}
            context="Limitation for a civil appeal runs from the date the judgment is pronounced." />
          <SourceCitation sourceType="Act" title="Administration of Justice Act, 2073" citationNumber="3" pageLabel="Section 8"
            context="The High Court shall hear appeals against judgments of the District Court within its territorial jurisdiction." last />
        </div>
      </div>
    </div>
  );
}

function Research() {
  return (
    <section className="section" id="research">
      <div className="wrap">
        <div className="research__grid">
          <div className="research__copy">
            <window.Reveal>
              <div className="eyebrow-row">
                <window.Eyebrow>AI Assistant</window.Eyebrow>
                <span className="pill-inc"><Icon name="folder-open" size={13} /> Included in MeroCase</span>
              </div>
            </window.Reveal>
            <window.Reveal delay={60}>
              <h2 className="h2">Legal research, from days to <span className="accent-sun">minutes</span>.</h2>
            </window.Reveal>
            <window.Reveal delay={120}>
              <p className="lead">Your AI legal assistant that does the research for you. Ask in Roman or Devanagari and get answered &mdash; grounded in Nepali statute and precedent, from the Constitution and Acts to najir and court decisions &mdash; then turn it into a drafted brief, every claim traced to its source.</p>
            </window.Reveal>
            <window.Reveal delay={160}>
              <ul className="ticks ticks--lg">
                {SITE.researchFeatures.map((f) => <li key={f}><Icon name="check" size={18} />{f}</li>)}
              </ul>
            </window.Reveal>
          </div>
          <window.Reveal delay={140} className="research__demo"><ResearchDemo /></window.Reveal>
        </div>
        <window.Reveal delay={80}>
          <div className="research__stats">
            <StatCard label="Research time" value="Minutes" subtitle="From days of manual search to minutes." icon={<Icon name="zap" size={18} />} />
            <StatCard variant="success" label="Legal documents" value="50K+" subtitle="Constitution, Acts, regulations, najir &amp; decisions, indexed." icon={<Icon name="book-open" size={18} />} />
            <StatCard variant="warning" label="Cited answers" value="100%" subtitle="Every response traced to primary sources." icon={<Icon name="file-check" size={18} />} />
          </div>
        </window.Reveal>
      </div>
    </section>
  );
}
window.Research = Research;
