import React from 'react';

import { discardLongClipsSelector, skipTaggingForLongClipsSelector } from '@/modules/feeds/Editor/redux/selectors';

import { FormRow } from '@/modules/@common/Form';
import { useAppSelector } from '@/modules/@common/store/hooks';
import CreateClipSelector from '@/modules/feeds/Editor/components/FormElements/CreateClipSelector/CreateClipSelector';
import DiscardLongClips from '@/modules/feeds/Editor/components/FormElements/DiscardLongClips/DiscardLongClips';
import Evergreen from '@/modules/feeds/Editor/components/FormElements/Evergreen/Evergreen';
import ImmediateAvailability from '@/modules/feeds/Editor/components/FormElements/ImmediateAvailability/ImmediateAvailability';
import ImportPlot from '@/modules/feeds/Editor/components/FormElements/ImportPlot/ImportPlot';
import MaxDuration from '@/modules/feeds/Editor/components/FormElements/MaxDuration/MaxDuration';
import MaxDurationForTagging from '@/modules/feeds/Editor/components/FormElements/MaxDurationForTagging/MaxDurationForTagging';
import PriorityVerification from '@/modules/feeds/Editor/components/FormElements/PriorityVerification/PriorityVerification';
import Restricted from '@/modules/feeds/Editor/components/FormElements/Restricted/Restricted';
import SkipTaggingForLongClips from '@/modules/feeds/Editor/components/FormElements/SkipTaggingForLongClips/SkipTaggingForLongClips';
import VideoFileType from '@/modules/feeds/Editor/components/FormElements/VideoFileType/VideoFileType';

function AdvancedTab() {
  const discardLongClips = useAppSelector(discardLongClipsSelector);
  const skipTaggingForLongClips = useAppSelector(skipTaggingForLongClipsSelector);
  return (
    <>
      <FormRow label="Discard Long Clips">
        <DiscardLongClips />
      </FormRow>
      {discardLongClips && (
        <FormRow label="Max Duration (sec)">
          <MaxDuration />
        </FormRow>
      )}
      <FormRow label="Skip Tagging for Long Clips">
        <SkipTaggingForLongClips />
      </FormRow>
      {skipTaggingForLongClips && (
        <FormRow label="Max Duration for Tagging (sec)">
          <MaxDurationForTagging />
        </FormRow>
      )}
      <FormRow label="Immediate Availability">
        <ImmediateAvailability />
      </FormRow>
      <FormRow label="Create Video Resolutions">
        <CreateClipSelector />
      </FormRow>
      <FormRow label="Video File Types">
        <VideoFileType />
      </FormRow>
      <FormRow label="Priority Verification">
        <PriorityVerification />
      </FormRow>
      <FormRow label="Restricted">
        <Restricted />
      </FormRow>
      <FormRow label="Import Plot/Description">
        <ImportPlot />
      </FormRow>
      <FormRow label="Evergreen">
        <Evergreen />
      </FormRow>
    </>
  );
}

export default AdvancedTab;
