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

use crate::*;

extern_class!(
    /// Specifies when UIKit destroys the current scene.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uiscenedestructioncondition?language=objc)
    #[unsafe(super(NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UISceneDestructionCondition;
);

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

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

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

impl UISceneDestructionCondition {
    extern_methods!(
        /// The scene should be destroyed when dismissed by the user.
        /// For example, swiping home on iOS, or tapping x on visionOS.
        #[unsafe(method(userInitiatedDismissal))]
        #[unsafe(method_family = none)]
        pub fn userInitiatedDismissal(mtm: MainThreadMarker) -> Retained<Self>;

        /// The scene should be destroyed when disconnected by the system.
        /// For example, terminating the process, or rebooting the device.
        #[unsafe(method(systemDisconnection))]
        #[unsafe(method_family = none)]
        pub fn systemDisconnection(mtm: MainThreadMarker) -> Retained<Self>;

        #[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(mtm: MainThreadMarker) -> Retained<Self>;
    );
}
