//! 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::*;

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiapplicationshortcuticontype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIApplicationShortcutIconType(pub NSInteger);
impl UIApplicationShortcutIconType {
    #[doc(alias = "UIApplicationShortcutIconTypeCompose")]
    pub const Compose: Self = Self(0);
    #[doc(alias = "UIApplicationShortcutIconTypePlay")]
    pub const Play: Self = Self(1);
    #[doc(alias = "UIApplicationShortcutIconTypePause")]
    pub const Pause: Self = Self(2);
    #[doc(alias = "UIApplicationShortcutIconTypeAdd")]
    pub const Add: Self = Self(3);
    #[doc(alias = "UIApplicationShortcutIconTypeLocation")]
    pub const Location: Self = Self(4);
    #[doc(alias = "UIApplicationShortcutIconTypeSearch")]
    pub const Search: Self = Self(5);
    #[doc(alias = "UIApplicationShortcutIconTypeShare")]
    pub const Share: Self = Self(6);
    #[doc(alias = "UIApplicationShortcutIconTypeProhibit")]
    pub const Prohibit: Self = Self(7);
    #[doc(alias = "UIApplicationShortcutIconTypeContact")]
    pub const Contact: Self = Self(8);
    #[doc(alias = "UIApplicationShortcutIconTypeHome")]
    pub const Home: Self = Self(9);
    #[doc(alias = "UIApplicationShortcutIconTypeMarkLocation")]
    pub const MarkLocation: Self = Self(10);
    #[doc(alias = "UIApplicationShortcutIconTypeFavorite")]
    pub const Favorite: Self = Self(11);
    #[doc(alias = "UIApplicationShortcutIconTypeLove")]
    pub const Love: Self = Self(12);
    #[doc(alias = "UIApplicationShortcutIconTypeCloud")]
    pub const Cloud: Self = Self(13);
    #[doc(alias = "UIApplicationShortcutIconTypeInvitation")]
    pub const Invitation: Self = Self(14);
    #[doc(alias = "UIApplicationShortcutIconTypeConfirmation")]
    pub const Confirmation: Self = Self(15);
    #[doc(alias = "UIApplicationShortcutIconTypeMail")]
    pub const Mail: Self = Self(16);
    #[doc(alias = "UIApplicationShortcutIconTypeMessage")]
    pub const Message: Self = Self(17);
    #[doc(alias = "UIApplicationShortcutIconTypeDate")]
    pub const Date: Self = Self(18);
    #[doc(alias = "UIApplicationShortcutIconTypeTime")]
    pub const Time: Self = Self(19);
    #[doc(alias = "UIApplicationShortcutIconTypeCapturePhoto")]
    pub const CapturePhoto: Self = Self(20);
    #[doc(alias = "UIApplicationShortcutIconTypeCaptureVideo")]
    pub const CaptureVideo: Self = Self(21);
    #[doc(alias = "UIApplicationShortcutIconTypeTask")]
    pub const Task: Self = Self(22);
    #[doc(alias = "UIApplicationShortcutIconTypeTaskCompleted")]
    pub const TaskCompleted: Self = Self(23);
    #[doc(alias = "UIApplicationShortcutIconTypeAlarm")]
    pub const Alarm: Self = Self(24);
    #[doc(alias = "UIApplicationShortcutIconTypeBookmark")]
    pub const Bookmark: Self = Self(25);
    #[doc(alias = "UIApplicationShortcutIconTypeShuffle")]
    pub const Shuffle: Self = Self(26);
    #[doc(alias = "UIApplicationShortcutIconTypeAudio")]
    pub const Audio: Self = Self(27);
    #[doc(alias = "UIApplicationShortcutIconTypeUpdate")]
    pub const Update: Self = Self(28);
}

unsafe impl Encode for UIApplicationShortcutIconType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for UIApplicationShortcutIconType {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiapplicationshortcuticon?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UIApplicationShortcutIcon;
);

extern_conformance!(
    unsafe impl NSCopying for UIApplicationShortcutIcon {}
);

unsafe impl CopyingHelper for UIApplicationShortcutIcon {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for UIApplicationShortcutIcon {}
);

impl UIApplicationShortcutIcon {
    extern_methods!(
        #[unsafe(method(iconWithType:))]
        #[unsafe(method_family = none)]
        pub fn iconWithType(r#type: UIApplicationShortcutIconType) -> Retained<Self>;

        #[unsafe(method(iconWithTemplateImageName:))]
        #[unsafe(method_family = none)]
        pub fn iconWithTemplateImageName(template_image_name: &NSString) -> Retained<Self>;

        #[unsafe(method(iconWithSystemImageName:))]
        #[unsafe(method_family = none)]
        pub fn iconWithSystemImageName(system_image_name: &NSString) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
impl UIApplicationShortcutIcon {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub fn new() -> Retained<Self>;
    );
}

impl DefaultRetained for UIApplicationShortcutIcon {
    #[inline]
    fn default_retained() -> Retained<Self> {
        Self::new()
    }
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiapplicationshortcutitem?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UIApplicationShortcutItem;
);

extern_conformance!(
    unsafe impl NSCopying for UIApplicationShortcutItem {}
);

unsafe impl CopyingHelper for UIApplicationShortcutItem {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSMutableCopying for UIApplicationShortcutItem {}
);

unsafe impl MutableCopyingHelper for UIApplicationShortcutItem {
    type Result = UIMutableApplicationShortcutItem;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for UIApplicationShortcutItem {}
);

impl UIApplicationShortcutItem {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        /// # Safety
        ///
        /// `user_info` generic should be of the correct type.
        #[unsafe(method(initWithType:localizedTitle:localizedSubtitle:icon:userInfo:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithType_localizedTitle_localizedSubtitle_icon_userInfo(
            this: Allocated<Self>,
            r#type: &NSString,
            localized_title: &NSString,
            localized_subtitle: Option<&NSString>,
            icon: Option<&UIApplicationShortcutIcon>,
            user_info: Option<&NSDictionary<NSString, ProtocolObject<dyn NSSecureCoding>>>,
        ) -> Retained<Self>;

        #[unsafe(method(initWithType:localizedTitle:))]
        #[unsafe(method_family = init)]
        pub fn initWithType_localizedTitle(
            this: Allocated<Self>,
            r#type: &NSString,
            localized_title: &NSString,
        ) -> Retained<Self>;

        #[unsafe(method(type))]
        #[unsafe(method_family = none)]
        pub fn r#type(&self) -> Retained<NSString>;

        #[unsafe(method(localizedTitle))]
        #[unsafe(method_family = none)]
        pub fn localizedTitle(&self) -> Retained<NSString>;

        #[unsafe(method(localizedSubtitle))]
        #[unsafe(method_family = none)]
        pub fn localizedSubtitle(&self) -> Option<Retained<NSString>>;

        #[unsafe(method(icon))]
        #[unsafe(method_family = none)]
        pub fn icon(&self) -> Option<Retained<UIApplicationShortcutIcon>>;

        #[unsafe(method(userInfo))]
        #[unsafe(method_family = none)]
        pub fn userInfo(
            &self,
        ) -> Option<Retained<NSDictionary<NSString, ProtocolObject<dyn NSSecureCoding>>>>;

        #[unsafe(method(targetContentIdentifier))]
        #[unsafe(method_family = none)]
        pub fn targetContentIdentifier(&self) -> Option<Retained<AnyObject>>;
    );
}

/// Methods declared on superclass `NSObject`.
impl UIApplicationShortcutItem {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uimutableapplicationshortcutitem?language=objc)
    #[unsafe(super(UIApplicationShortcutItem, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UIMutableApplicationShortcutItem;
);

extern_conformance!(
    unsafe impl NSCopying for UIMutableApplicationShortcutItem {}
);

unsafe impl CopyingHelper for UIMutableApplicationShortcutItem {
    type Result = UIApplicationShortcutItem;
}

extern_conformance!(
    unsafe impl NSMutableCopying for UIMutableApplicationShortcutItem {}
);

unsafe impl MutableCopyingHelper for UIMutableApplicationShortcutItem {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for UIMutableApplicationShortcutItem {}
);

impl UIMutableApplicationShortcutItem {
    extern_methods!(
        #[unsafe(method(type))]
        #[unsafe(method_family = none)]
        pub fn r#type(&self) -> Retained<NSString>;

        /// Setter for [`type`][Self::type].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setType:))]
        #[unsafe(method_family = none)]
        pub fn setType(&self, r#type: &NSString);

        #[unsafe(method(localizedTitle))]
        #[unsafe(method_family = none)]
        pub fn localizedTitle(&self) -> Retained<NSString>;

        /// Setter for [`localizedTitle`][Self::localizedTitle].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setLocalizedTitle:))]
        #[unsafe(method_family = none)]
        pub fn setLocalizedTitle(&self, localized_title: &NSString);

        #[unsafe(method(localizedSubtitle))]
        #[unsafe(method_family = none)]
        pub fn localizedSubtitle(&self) -> Option<Retained<NSString>>;

        /// Setter for [`localizedSubtitle`][Self::localizedSubtitle].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setLocalizedSubtitle:))]
        #[unsafe(method_family = none)]
        pub fn setLocalizedSubtitle(&self, localized_subtitle: Option<&NSString>);

        #[unsafe(method(icon))]
        #[unsafe(method_family = none)]
        pub fn icon(&self) -> Option<Retained<UIApplicationShortcutIcon>>;

        /// Setter for [`icon`][Self::icon].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setIcon:))]
        #[unsafe(method_family = none)]
        pub fn setIcon(&self, icon: Option<&UIApplicationShortcutIcon>);

        #[unsafe(method(userInfo))]
        #[unsafe(method_family = none)]
        pub fn userInfo(
            &self,
        ) -> Option<Retained<NSDictionary<NSString, ProtocolObject<dyn NSSecureCoding>>>>;

        /// Setter for [`userInfo`][Self::userInfo].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        ///
        /// # Safety
        ///
        /// `user_info` generic should be of the correct type.
        #[unsafe(method(setUserInfo:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setUserInfo(
            &self,
            user_info: Option<&NSDictionary<NSString, ProtocolObject<dyn NSSecureCoding>>>,
        );

        #[unsafe(method(targetContentIdentifier))]
        #[unsafe(method_family = none)]
        pub fn targetContentIdentifier(&self) -> Option<Retained<AnyObject>>;

        /// Setter for [`targetContentIdentifier`][Self::targetContentIdentifier].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        ///
        /// # Safety
        ///
        /// `target_content_identifier` should be of the correct type.
        #[unsafe(method(setTargetContentIdentifier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTargetContentIdentifier(
            &self,
            target_content_identifier: Option<&AnyObject>,
        );
    );
}

/// Methods declared on superclass `UIApplicationShortcutItem`.
impl UIMutableApplicationShortcutItem {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        /// # Safety
        ///
        /// `user_info` generic should be of the correct type.
        #[unsafe(method(initWithType:localizedTitle:localizedSubtitle:icon:userInfo:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithType_localizedTitle_localizedSubtitle_icon_userInfo(
            this: Allocated<Self>,
            r#type: &NSString,
            localized_title: &NSString,
            localized_subtitle: Option<&NSString>,
            icon: Option<&UIApplicationShortcutIcon>,
            user_info: Option<&NSDictionary<NSString, ProtocolObject<dyn NSSecureCoding>>>,
        ) -> Retained<Self>;

        #[unsafe(method(initWithType:localizedTitle:))]
        #[unsafe(method_family = init)]
        pub fn initWithType_localizedTitle(
            this: Allocated<Self>,
            r#type: &NSString,
            localized_title: &NSString,
        ) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
impl UIMutableApplicationShortcutItem {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}
