//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiactivityitemsconfigurationmetadatakey?language=objc)
// NS_TYPED_EXTENSIBLE_ENUM
pub type UIActivityItemsConfigurationMetadataKey = NSString;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiactivityitemsconfigurationmetadatakeytitle?language=objc)
    pub static UIActivityItemsConfigurationMetadataKeyTitle:
        &'static UIActivityItemsConfigurationMetadataKey;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiactivityitemsconfigurationmetadatakeymessagebody?language=objc)
    pub static UIActivityItemsConfigurationMetadataKeyMessageBody:
        &'static UIActivityItemsConfigurationMetadataKey;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiactivityitemsconfigurationmetadatakeylinkpresentationmetadata?language=objc)
    pub static UIActivityItemsConfigurationMetadataKeyLinkPresentationMetadata:
        &'static UIActivityItemsConfigurationMetadataKey;
}

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiactivityitemsconfigurationpreviewintent?language=objc)
// NS_TYPED_EXTENSIBLE_ENUM
pub type UIActivityItemsConfigurationPreviewIntent = NSString;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiactivityitemsconfigurationpreviewintentfullsize?language=objc)
    pub static UIActivityItemsConfigurationPreviewIntentFullSize:
        &'static UIActivityItemsConfigurationPreviewIntent;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiactivityitemsconfigurationpreviewintentthumbnail?language=objc)
    pub static UIActivityItemsConfigurationPreviewIntentThumbnail:
        &'static UIActivityItemsConfigurationPreviewIntent;
}

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiactivityitemsconfigurationinteraction?language=objc)
// NS_TYPED_EXTENSIBLE_ENUM
pub type UIActivityItemsConfigurationInteraction = NSString;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiactivityitemsconfigurationinteractionshare?language=objc)
    pub static UIActivityItemsConfigurationInteractionShare:
        &'static UIActivityItemsConfigurationInteraction;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiactivityitemsconfigurationinteractioncopy?language=objc)
    pub static UIActivityItemsConfigurationInteractionCopy:
        &'static UIActivityItemsConfigurationInteraction;
}

extern_protocol!(
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiactivityitemsconfigurationreading?language=objc)
    pub unsafe trait UIActivityItemsConfigurationReading:
        NSObjectProtocol + MainThreadOnly
    {
        #[unsafe(method(itemProvidersForActivityItemsConfiguration))]
        #[unsafe(method_family = none)]
        fn itemProvidersForActivityItemsConfiguration(&self) -> Retained<NSArray<NSItemProvider>>;

        #[optional]
        #[unsafe(method(activityItemsConfigurationSupportsInteraction:))]
        #[unsafe(method_family = none)]
        fn activityItemsConfigurationSupportsInteraction(
            &self,
            interaction: &UIActivityItemsConfigurationInteraction,
        ) -> bool;

        #[optional]
        #[unsafe(method(activityItemsConfigurationMetadataForKey:))]
        #[unsafe(method_family = none)]
        fn activityItemsConfigurationMetadataForKey(
            &self,
            key: &UIActivityItemsConfigurationMetadataKey,
        ) -> Option<Retained<AnyObject>>;

        #[optional]
        #[unsafe(method(activityItemsConfigurationMetadataForItemAtIndex:key:))]
        #[unsafe(method_family = none)]
        fn activityItemsConfigurationMetadataForItemAtIndex_key(
            &self,
            index: NSInteger,
            key: &UIActivityItemsConfigurationMetadataKey,
        ) -> Option<Retained<AnyObject>>;

        #[cfg(feature = "objc2-core-foundation")]
        #[optional]
        #[unsafe(method(activityItemsConfigurationPreviewForItemAtIndex:intent:suggestedSize:))]
        #[unsafe(method_family = none)]
        fn activityItemsConfigurationPreviewForItemAtIndex_intent_suggestedSize(
            &self,
            index: NSInteger,
            intent: &UIActivityItemsConfigurationPreviewIntent,
            suggested_size: CGSize,
        ) -> Option<Retained<NSItemProvider>>;

        #[cfg(feature = "UIActivity")]
        #[optional]
        #[unsafe(method(applicationActivitiesForActivityItemsConfiguration))]
        #[unsafe(method_family = none)]
        fn applicationActivitiesForActivityItemsConfiguration(
            &self,
        ) -> Option<Retained<NSArray<UIActivity>>>;
    }
);

extern_protocol!(
    /// Protocol adopted by classes that can provide activity items configurations
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uiactivityitemsconfigurationproviding?language=objc)
    pub unsafe trait UIActivityItemsConfigurationProviding: NSObjectProtocol {
        #[unsafe(method(activityItemsConfiguration))]
        #[unsafe(method_family = none)]
        fn activityItemsConfiguration(
            &self,
            mtm: MainThreadMarker,
        ) -> Option<Retained<ProtocolObject<dyn UIActivityItemsConfigurationReading>>>;
    }
);
