import { Checkbox } from '@/components/ui/checkbox';
import { Label } from '@/components/ui/label';
import { ContentSettings as ContentSettingsType } from '../types/settings';

interface ContentSettingsProps {
  content: ContentSettingsType;
  onChange: (content: ContentSettingsType) => void;
}

export function ContentSettings({ content, onChange }: ContentSettingsProps) {
  const handleChange = (field: keyof ContentSettingsType, value: boolean) => {
    onChange({
      ...content,
      [field]: value,
    });
  };

  return (
    <div className="space-y-6">
      <div className="space-y-4">
        <div className="flex items-center justify-between">
          <div className="space-y-0.5">
            <Label htmlFor="explicit_content">Contenu explicite</Label>
            <p className="text-sm text-muted-foreground">
              Autoriser l'affichage de contenu explicite
            </p>
          </div>
          <Checkbox
            id="explicit_content"
            checked={content.explicit_content}
            onCheckedChange={(checked) =>
              handleChange('explicit_content', checked === true)
            }
          />
        </div>

        <div className="flex items-center justify-between">
          <div className="space-y-0.5">
            <Label htmlFor="autoplay">Lecture automatique</Label>
            <p className="text-sm text-muted-foreground">
              Lire automatiquement les pistes audio
            </p>
          </div>
          <Checkbox
            id="autoplay"
            checked={content.autoplay}
            onCheckedChange={(checked) =>
              handleChange('autoplay', checked === true)
            }
          />
        </div>
      </div>
    </div>
  );
}
