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

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UIActivityItemsConfiguration;

    unsafe impl ClassType for UIActivityItemsConfiguration {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSObjectProtocol for UIActivityItemsConfiguration {}

#[cfg(feature = "UIActivityItemsConfigurationReading")]
unsafe impl UIActivityItemsConfigurationReading for UIActivityItemsConfiguration {}

extern_methods!(
    unsafe impl UIActivityItemsConfiguration {
        #[method_id(@__retain_semantics Other localObject)]
        pub unsafe fn localObject(&self) -> Option<Retained<AnyObject>>;

        #[method(setLocalObject:)]
        pub unsafe fn setLocalObject(&self, local_object: Option<&AnyObject>);

        #[cfg(feature = "UIActivityItemsConfigurationReading")]
        #[method_id(@__retain_semantics Other supportedInteractions)]
        pub unsafe fn supportedInteractions(
            &self,
        ) -> Retained<NSArray<UIActivityItemsConfigurationInteraction>>;

        #[cfg(feature = "UIActivityItemsConfigurationReading")]
        #[method(setSupportedInteractions:)]
        pub unsafe fn setSupportedInteractions(
            &self,
            supported_interactions: &NSArray<UIActivityItemsConfigurationInteraction>,
        );

        #[cfg(all(feature = "UIActivityItemsConfigurationReading", feature = "block2"))]
        #[method(metadataProvider)]
        pub unsafe fn metadataProvider(
            &self,
        ) -> *mut block2::Block<
            dyn Fn(NonNull<UIActivityItemsConfigurationMetadataKey>) -> *mut AnyObject,
        >;

        #[cfg(all(feature = "UIActivityItemsConfigurationReading", feature = "block2"))]
        #[method(setMetadataProvider:)]
        pub unsafe fn setMetadataProvider(
            &self,
            metadata_provider: Option<
                &block2::Block<
                    dyn Fn(NonNull<UIActivityItemsConfigurationMetadataKey>) -> *mut AnyObject,
                >,
            >,
        );

        #[cfg(all(feature = "UIActivityItemsConfigurationReading", feature = "block2"))]
        #[method(perItemMetadataProvider)]
        pub unsafe fn perItemMetadataProvider(
            &self,
        ) -> *mut block2::Block<
            dyn Fn(NSInteger, NonNull<UIActivityItemsConfigurationMetadataKey>) -> *mut AnyObject,
        >;

        #[cfg(all(feature = "UIActivityItemsConfigurationReading", feature = "block2"))]
        #[method(setPerItemMetadataProvider:)]
        pub unsafe fn setPerItemMetadataProvider(
            &self,
            per_item_metadata_provider: Option<
                &block2::Block<
                    dyn Fn(
                        NSInteger,
                        NonNull<UIActivityItemsConfigurationMetadataKey>,
                    ) -> *mut AnyObject,
                >,
            >,
        );

        #[cfg(all(feature = "UIActivityItemsConfigurationReading", feature = "block2"))]
        #[method(previewProvider)]
        pub unsafe fn previewProvider(
            &self,
        ) -> *mut block2::Block<
            dyn Fn(
                NSInteger,
                NonNull<UIActivityItemsConfigurationPreviewIntent>,
                CGSize,
            ) -> *mut NSItemProvider,
        >;

        #[cfg(all(feature = "UIActivityItemsConfigurationReading", feature = "block2"))]
        #[method(setPreviewProvider:)]
        pub unsafe fn setPreviewProvider(
            &self,
            preview_provider: Option<
                &block2::Block<
                    dyn Fn(
                        NSInteger,
                        NonNull<UIActivityItemsConfigurationPreviewIntent>,
                        CGSize,
                    ) -> *mut NSItemProvider,
                >,
            >,
        );

        #[cfg(all(feature = "UIActivity", feature = "block2"))]
        #[method(applicationActivitiesProvider)]
        pub unsafe fn applicationActivitiesProvider(
            &self,
        ) -> *mut block2::Block<dyn Fn() -> NonNull<NSArray<UIActivity>>>;

        #[cfg(all(feature = "UIActivity", feature = "block2"))]
        #[method(setApplicationActivitiesProvider:)]
        pub unsafe fn setApplicationActivitiesProvider(
            &self,
            application_activities_provider: Option<
                &block2::Block<dyn Fn() -> NonNull<NSArray<UIActivity>>>,
            >,
        );

        #[method_id(@__retain_semantics Other activityItemsConfigurationWithObjects:)]
        pub unsafe fn activityItemsConfigurationWithObjects(
            objects: &NSArray<ProtocolObject<dyn NSItemProviderWriting>>,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Other activityItemsConfigurationWithItemProviders:)]
        pub unsafe fn activityItemsConfigurationWithItemProviders(
            item_providers: &NSArray<NSItemProvider>,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init initWithObjects:)]
        pub unsafe fn initWithObjects(
            this: Allocated<Self>,
            objects: &NSArray<ProtocolObject<dyn NSItemProviderWriting>>,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init initWithItemProviders:)]
        pub unsafe fn initWithItemProviders(
            this: Allocated<Self>,
            item_providers: &NSArray<NSItemProvider>,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    }
);
