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

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsusernotificationactivationtype?language=objc)
// NS_ENUM
#[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSUserNotificationActivationType(pub NSInteger);
impl NSUserNotificationActivationType {
    #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
    #[doc(alias = "NSUserNotificationActivationTypeNone")]
    pub const None: Self = Self(0);
    #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
    #[doc(alias = "NSUserNotificationActivationTypeContentsClicked")]
    pub const ContentsClicked: Self = Self(1);
    #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
    #[doc(alias = "NSUserNotificationActivationTypeActionButtonClicked")]
    pub const ActionButtonClicked: Self = Self(2);
    #[doc(alias = "NSUserNotificationActivationTypeReplied")]
    pub const Replied: Self = Self(3);
    #[doc(alias = "NSUserNotificationActivationTypeAdditionalActionClicked")]
    pub const AdditionalActionClicked: Self = Self(4);
}

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

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

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsusernotification?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
    pub struct NSUserNotification;
);

#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUserNotification {}

#[cfg(feature = "NSObject")]
unsafe impl CopyingHelper for NSUserNotification {
    type Result = Self;
}

unsafe impl NSObjectProtocol for NSUserNotification {}

impl NSUserNotification {
    extern_methods!(
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[cfg(feature = "NSString")]
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(title))]
        #[unsafe(method_family = none)]
        pub unsafe fn title(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        /// Setter for [`title`][Self::title].
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(setTitle:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTitle(&self, title: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(subtitle))]
        #[unsafe(method_family = none)]
        pub unsafe fn subtitle(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        /// Setter for [`subtitle`][Self::subtitle].
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(setSubtitle:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(informativeText))]
        #[unsafe(method_family = none)]
        pub unsafe fn informativeText(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        /// Setter for [`informativeText`][Self::informativeText].
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(setInformativeText:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setInformativeText(&self, informative_text: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(actionButtonTitle))]
        #[unsafe(method_family = none)]
        pub unsafe fn actionButtonTitle(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`actionButtonTitle`][Self::actionButtonTitle].
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(setActionButtonTitle:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setActionButtonTitle(&self, action_button_title: &NSString);

        #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(userInfo))]
        #[unsafe(method_family = none)]
        pub unsafe fn userInfo(&self) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;

        #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
        /// Setter for [`userInfo`][Self::userInfo].
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(setUserInfo:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setUserInfo(&self, user_info: Option<&NSDictionary<NSString, AnyObject>>);

        #[cfg(feature = "NSDate")]
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(deliveryDate))]
        #[unsafe(method_family = none)]
        pub unsafe fn deliveryDate(&self) -> Option<Retained<NSDate>>;

        #[cfg(feature = "NSDate")]
        /// Setter for [`deliveryDate`][Self::deliveryDate].
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(setDeliveryDate:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDeliveryDate(&self, delivery_date: Option<&NSDate>);

        #[cfg(feature = "NSTimeZone")]
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(deliveryTimeZone))]
        #[unsafe(method_family = none)]
        pub unsafe fn deliveryTimeZone(&self) -> Option<Retained<NSTimeZone>>;

        #[cfg(feature = "NSTimeZone")]
        /// Setter for [`deliveryTimeZone`][Self::deliveryTimeZone].
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(setDeliveryTimeZone:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDeliveryTimeZone(&self, delivery_time_zone: Option<&NSTimeZone>);

        #[cfg(feature = "NSCalendar")]
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(deliveryRepeatInterval))]
        #[unsafe(method_family = none)]
        pub unsafe fn deliveryRepeatInterval(&self) -> Option<Retained<NSDateComponents>>;

        #[cfg(feature = "NSCalendar")]
        /// Setter for [`deliveryRepeatInterval`][Self::deliveryRepeatInterval].
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(setDeliveryRepeatInterval:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDeliveryRepeatInterval(
            &self,
            delivery_repeat_interval: Option<&NSDateComponents>,
        );

        #[cfg(feature = "NSDate")]
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(actualDeliveryDate))]
        #[unsafe(method_family = none)]
        pub unsafe fn actualDeliveryDate(&self) -> Option<Retained<NSDate>>;

        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(isPresented))]
        #[unsafe(method_family = none)]
        pub unsafe fn isPresented(&self) -> bool;

        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(isRemote))]
        #[unsafe(method_family = none)]
        pub unsafe fn isRemote(&self) -> bool;

        #[cfg(feature = "NSString")]
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(soundName))]
        #[unsafe(method_family = none)]
        pub unsafe fn soundName(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        /// Setter for [`soundName`][Self::soundName].
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(setSoundName:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSoundName(&self, sound_name: Option<&NSString>);

        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(hasActionButton))]
        #[unsafe(method_family = none)]
        pub unsafe fn hasActionButton(&self) -> bool;

        /// Setter for [`hasActionButton`][Self::hasActionButton].
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(setHasActionButton:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setHasActionButton(&self, has_action_button: bool);

        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(activationType))]
        #[unsafe(method_family = none)]
        pub unsafe fn activationType(&self) -> NSUserNotificationActivationType;

        #[cfg(feature = "NSString")]
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(otherButtonTitle))]
        #[unsafe(method_family = none)]
        pub unsafe fn otherButtonTitle(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`otherButtonTitle`][Self::otherButtonTitle].
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(setOtherButtonTitle:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setOtherButtonTitle(&self, other_button_title: &NSString);

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

        #[cfg(feature = "NSString")]
        /// Setter for [`identifier`][Self::identifier].
        #[unsafe(method(setIdentifier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>);

        #[unsafe(method(hasReplyButton))]
        #[unsafe(method_family = none)]
        pub unsafe fn hasReplyButton(&self) -> bool;

        /// Setter for [`hasReplyButton`][Self::hasReplyButton].
        #[unsafe(method(setHasReplyButton:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setHasReplyButton(&self, has_reply_button: bool);

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

        #[cfg(feature = "NSString")]
        /// Setter for [`responsePlaceholder`][Self::responsePlaceholder].
        #[unsafe(method(setResponsePlaceholder:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setResponsePlaceholder(&self, response_placeholder: Option<&NSString>);

        #[cfg(feature = "NSAttributedString")]
        #[unsafe(method(response))]
        #[unsafe(method_family = none)]
        pub unsafe fn response(&self) -> Option<Retained<NSAttributedString>>;

        #[cfg(feature = "NSArray")]
        #[unsafe(method(additionalActions))]
        #[unsafe(method_family = none)]
        pub unsafe fn additionalActions(
            &self,
        ) -> Option<Retained<NSArray<NSUserNotificationAction>>>;

        #[cfg(feature = "NSArray")]
        /// Setter for [`additionalActions`][Self::additionalActions].
        #[unsafe(method(setAdditionalActions:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAdditionalActions(
            &self,
            additional_actions: Option<&NSArray<NSUserNotificationAction>>,
        );

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

/// Methods declared on superclass `NSObject`.
impl NSUserNotification {
    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/foundation/nsusernotificationaction?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
    pub struct NSUserNotificationAction;
);

#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUserNotificationAction {}

#[cfg(feature = "NSObject")]
unsafe impl CopyingHelper for NSUserNotificationAction {
    type Result = Self;
}

unsafe impl NSObjectProtocol for NSUserNotificationAction {}

impl NSUserNotificationAction {
    extern_methods!(
        #[cfg(feature = "NSString")]
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(actionWithIdentifier:title:))]
        #[unsafe(method_family = none)]
        pub unsafe fn actionWithIdentifier_title(
            identifier: Option<&NSString>,
            title: Option<&NSString>,
        ) -> Retained<Self>;

        #[cfg(feature = "NSString")]
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(identifier))]
        #[unsafe(method_family = none)]
        pub unsafe fn identifier(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(title))]
        #[unsafe(method_family = none)]
        pub unsafe fn title(&self) -> Option<Retained<NSString>>;
    );
}

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

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

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsusernotificationdefaultsoundname?language=objc)
    #[cfg(feature = "NSString")]
    pub static NSUserNotificationDefaultSoundName: &'static NSString;
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsusernotificationcenter?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
    pub struct NSUserNotificationCenter;
);

unsafe impl NSObjectProtocol for NSUserNotificationCenter {}

impl NSUserNotificationCenter {
    extern_methods!(
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(defaultUserNotificationCenter))]
        #[unsafe(method_family = none)]
        pub unsafe fn defaultUserNotificationCenter() -> Retained<NSUserNotificationCenter>;

        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(delegate))]
        #[unsafe(method_family = none)]
        pub unsafe fn delegate(
            &self,
        ) -> Option<Retained<ProtocolObject<dyn NSUserNotificationCenterDelegate>>>;

        /// Setter for [`delegate`][Self::delegate].
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(setDelegate:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDelegate(
            &self,
            delegate: Option<&ProtocolObject<dyn NSUserNotificationCenterDelegate>>,
        );

        #[cfg(feature = "NSArray")]
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(scheduledNotifications))]
        #[unsafe(method_family = none)]
        pub unsafe fn scheduledNotifications(&self) -> Retained<NSArray<NSUserNotification>>;

        #[cfg(feature = "NSArray")]
        /// Setter for [`scheduledNotifications`][Self::scheduledNotifications].
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(setScheduledNotifications:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setScheduledNotifications(
            &self,
            scheduled_notifications: &NSArray<NSUserNotification>,
        );

        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(scheduleNotification:))]
        #[unsafe(method_family = none)]
        pub unsafe fn scheduleNotification(&self, notification: &NSUserNotification);

        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(removeScheduledNotification:))]
        #[unsafe(method_family = none)]
        pub unsafe fn removeScheduledNotification(&self, notification: &NSUserNotification);

        #[cfg(feature = "NSArray")]
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(deliveredNotifications))]
        #[unsafe(method_family = none)]
        pub unsafe fn deliveredNotifications(&self) -> Retained<NSArray<NSUserNotification>>;

        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(deliverNotification:))]
        #[unsafe(method_family = none)]
        pub unsafe fn deliverNotification(&self, notification: &NSUserNotification);

        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(removeDeliveredNotification:))]
        #[unsafe(method_family = none)]
        pub unsafe fn removeDeliveredNotification(&self, notification: &NSUserNotification);

        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[unsafe(method(removeAllDeliveredNotifications))]
        #[unsafe(method_family = none)]
        pub unsafe fn removeAllDeliveredNotifications(&self);
    );
}

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

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

extern_protocol!(
    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsusernotificationcenterdelegate?language=objc)
    pub unsafe trait NSUserNotificationCenterDelegate: NSObjectProtocol {
        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[optional]
        #[unsafe(method(userNotificationCenter:didDeliverNotification:))]
        #[unsafe(method_family = none)]
        unsafe fn userNotificationCenter_didDeliverNotification(
            &self,
            center: &NSUserNotificationCenter,
            notification: &NSUserNotification,
        );

        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[optional]
        #[unsafe(method(userNotificationCenter:didActivateNotification:))]
        #[unsafe(method_family = none)]
        unsafe fn userNotificationCenter_didActivateNotification(
            &self,
            center: &NSUserNotificationCenter,
            notification: &NSUserNotification,
        );

        #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"]
        #[optional]
        #[unsafe(method(userNotificationCenter:shouldPresentNotification:))]
        #[unsafe(method_family = none)]
        unsafe fn userNotificationCenter_shouldPresentNotification(
            &self,
            center: &NSUserNotificationCenter,
            notification: &NSUserNotification,
        ) -> bool;
    }
);
