export default function VehicleVinDisplay({ children }) {
  if (!children) return null;

  if (typeof children !== "string" || children.length !== 17) return children;
  const vin = children.trim();

  const first = vin.substring(0, 9);
  const second = vin.substring(9, 17);

  return (
    <>
      <span>{first}</span>
      <span style={{ textDecoration: "underline" }}>{second}</span>
    </>
  );
}
