// components/main/kabelueberwachung/kue705FO/modals/TdrEinstellung.tsx
"use client";

import React, { useState } from "react";

interface Props {
  slot: number;
}

export default function TdrEinstellung({ slot }: Props) {
  const [tdrActive, setTdrActive] = useState(false);
  const [params, setParams] = useState({
    verstarkung: "",
    pulsweite: "",
    trigger: "",
  });

  return (
    <div className="space-y-4">
      {/*
            <h2 className="text-lg font-semibold">
        TDR-Einstellung – Slot {slot + 1}
      </h2>
      
      */}

      <div>
        <label className="flex items-center gap-2">
          <input
            type="checkbox"
            checked={tdrActive}
            onChange={(e) => setTdrActive(e.target.checked)}
          />
          TDR-Funktion aktivieren
        </label>
      </div>

      <div className="grid grid-cols-1 md:grid-cols-3 gap-4">
        <input
          placeholder="Verstärkung"
          value={params.verstarkung}
          onChange={(e) =>
            setParams({ ...params, verstarkung: e.target.value })
          }
          className="border px-2 py-1 rounded"
        />
        <input
          placeholder="Pulsweite"
          value={params.pulsweite}
          onChange={(e) => setParams({ ...params, pulsweite: e.target.value })}
          className="border px-2 py-1 rounded"
        />
        <input
          placeholder="Trigger"
          value={params.trigger}
          onChange={(e) => setParams({ ...params, trigger: e.target.value })}
          className="border px-2 py-1 rounded"
        />
      </div>
    </div>
  );
}
