import React from 'react';

interface RulesFormProps {
  rules: string;
  onChange: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
}

const RulesForm: React.FC<RulesFormProps> = ({
  rules,
  onChange
}) => {
  return (
    <div className="card mb-4">
      <div className="card-body">
        <label htmlFor="rules" className="form-label">
          Additional Rules
        </label>
        <textarea
          className="form-control"
          id="rules"
          name="rules"
          rows={3}
          value={rules || ""}
          onChange={onChange}
          placeholder="Any specific rules for renting this item"
        />
      </div>
    </div>
  );
};

export default RulesForm;