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

use crate::*;

extern_protocol!(
    pub unsafe trait NSPreviewRepresentableActivityItem: NSObjectProtocol {
        #[method_id(@__retain_semantics Other item)]
        unsafe fn item(&self) -> Retained<AnyObject>;

        #[optional]
        #[method_id(@__retain_semantics Other title)]
        unsafe fn title(&self) -> Option<Retained<NSString>>;

        #[optional]
        #[method_id(@__retain_semantics Other imageProvider)]
        unsafe fn imageProvider(&self) -> Option<Retained<NSItemProvider>>;

        #[optional]
        #[method_id(@__retain_semantics Other iconProvider)]
        unsafe fn iconProvider(&self) -> Option<Retained<NSItemProvider>>;
    }

    unsafe impl ProtocolType for dyn NSPreviewRepresentableActivityItem {}
);

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

    unsafe impl ClassType for NSPreviewRepresentingActivityItem {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

unsafe impl NSObjectProtocol for NSPreviewRepresentingActivityItem {}

unsafe impl NSPreviewRepresentableActivityItem for NSPreviewRepresentingActivityItem {}

extern_methods!(
    unsafe impl NSPreviewRepresentingActivityItem {
        #[cfg(feature = "NSImage")]
        #[method_id(@__retain_semantics Init initWithItem:title:image:icon:)]
        pub unsafe fn initWithItem_title_image_icon(
            this: Allocated<Self>,
            item: &AnyObject,
            title: Option<&NSString>,
            image: Option<&NSImage>,
            icon: Option<&NSImage>,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init initWithItem:title:imageProvider:iconProvider:)]
        pub unsafe fn initWithItem_title_imageProvider_iconProvider(
            this: Allocated<Self>,
            item: &AnyObject,
            title: Option<&NSString>,
            image_provider: Option<&NSItemProvider>,
            icon_provider: Option<&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() -> Retained<Self>;
    }
);
