//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_protocol!(
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uidatasourcetranslating?language=objc)
    pub unsafe trait UIDataSourceTranslating: NSObjectProtocol + MainThreadOnly {
        #[unsafe(method(presentationSectionIndexForDataSourceSectionIndex:))]
        #[unsafe(method_family = none)]
        fn presentationSectionIndexForDataSourceSectionIndex(
            &self,
            data_source_section_index: NSInteger,
        ) -> NSInteger;

        #[unsafe(method(dataSourceSectionIndexForPresentationSectionIndex:))]
        #[unsafe(method_family = none)]
        fn dataSourceSectionIndexForPresentationSectionIndex(
            &self,
            presentation_section_index: NSInteger,
        ) -> NSInteger;

        #[unsafe(method(presentationIndexPathForDataSourceIndexPath:))]
        #[unsafe(method_family = none)]
        fn presentationIndexPathForDataSourceIndexPath(
            &self,
            data_source_index_path: Option<&NSIndexPath>,
        ) -> Option<Retained<NSIndexPath>>;

        #[unsafe(method(dataSourceIndexPathForPresentationIndexPath:))]
        #[unsafe(method_family = none)]
        fn dataSourceIndexPathForPresentationIndexPath(
            &self,
            presentation_index_path: Option<&NSIndexPath>,
        ) -> Option<Retained<NSIndexPath>>;

        #[cfg(feature = "block2")]
        #[unsafe(method(performUsingPresentationValues:))]
        #[unsafe(method_family = none)]
        fn performUsingPresentationValues(
            &self,
            actions_to_translate: &block2::DynBlock<dyn Fn() + '_>,
        );
    }
);
