"use client";

import type { ReactNode } from "react";
import styles from "./platform-shell.module.css";

export function DetailSection(props: {
  title: string;
  description: string;
  children: ReactNode;
}) {
  return (
    <article className={styles.detailCard}>
      <div className={styles.cardHeader}>
        <div>
          <h3>{props.title}</h3>
          <p>{props.description}</p>
        </div>
      </div>
      {props.children}
    </article>
  );
}

export function DetailKeyGrid(props: { items: Array<{ label: string; value: ReactNode }> }) {
  return (
    <div className={styles.keyValueGrid}>
      {props.items.map((item) => (
        <div key={item.label}>
          <span>{item.label}</span>
          <strong>{item.value}</strong>
        </div>
      ))}
    </div>
  );
}
