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

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uistoryboardsegue?language=objc)
    #[unsafe(super(NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
    pub struct UIStoryboardSegue;
);

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

impl UIStoryboardSegue {
    extern_methods!(
        #[cfg(all(
            feature = "UIResponder",
            feature = "UIViewController",
            feature = "block2"
        ))]
        #[unsafe(method(segueWithIdentifier:source:destination:performHandler:))]
        #[unsafe(method_family = none)]
        pub fn segueWithIdentifier_source_destination_performHandler(
            identifier: Option<&NSString>,
            source: &UIViewController,
            destination: &UIViewController,
            perform_handler: &block2::DynBlock<dyn Fn()>,
        ) -> Retained<Self>;

        #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
        #[unsafe(method(initWithIdentifier:source:destination:))]
        #[unsafe(method_family = init)]
        pub fn initWithIdentifier_source_destination(
            this: Allocated<Self>,
            identifier: Option<&NSString>,
            source: &UIViewController,
            destination: &UIViewController,
        ) -> Retained<Self>;

        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
        #[unsafe(method(identifier))]
        #[unsafe(method_family = none)]
        pub fn identifier(&self) -> Option<Retained<NSString>>;

        #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
        #[unsafe(method(sourceViewController))]
        #[unsafe(method_family = none)]
        pub fn sourceViewController(&self) -> Retained<UIViewController>;

        #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
        #[unsafe(method(destinationViewController))]
        #[unsafe(method_family = none)]
        pub fn destinationViewController(&self) -> Retained<UIViewController>;

        /// Subclasses can override this method to augment or replace the effect of this segue. For example, to animate alongside the effect of a Modal Presentation segue, an override of this method can call super, then send -animateAlongsideTransition:completion: to the transitionCoordinator of the destinationViewController.
        /// The segue runtime will call +[UIView setAnimationsAreEnabled:] prior to invoking this method, based on the value of the Animates checkbox in the Properties Inspector for the segue.
        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
        #[unsafe(method(perform))]
        #[unsafe(method_family = none)]
        pub fn perform(&self);
    );
}

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

extern_class!(
    /// Encapsulates the source of a prospective unwind segue.
    /// You do not create instances of this class directly. Instead, UIKit creates an instance of this class and sends -allowedChildViewControllersForUnwindingFromSource: to each ancestor of the sourceViewController until it finds a view controller which returns YES from -canPerformUnwindSegueAction:fromViewController:sender:.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uistoryboardunwindseguesource?language=objc)
    #[unsafe(super(NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UIStoryboardUnwindSegueSource;
);

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

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

        #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
        #[unsafe(method(sourceViewController))]
        #[unsafe(method_family = none)]
        pub fn sourceViewController(&self) -> Retained<UIViewController>;

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

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

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