//! 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!(
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uinib?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 UINib;
);

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

impl UINib {
    extern_methods!(
        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
        #[unsafe(method(nibWithNibName:bundle:))]
        #[unsafe(method_family = none)]
        pub fn nibWithNibName_bundle(
            name: &NSString,
            bundle_or_nil: Option<&NSBundle>,
            mtm: MainThreadMarker,
        ) -> Retained<UINib>;

        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
        #[unsafe(method(nibWithData:bundle:))]
        #[unsafe(method_family = none)]
        pub fn nibWithData_bundle(
            data: &NSData,
            bundle_or_nil: Option<&NSBundle>,
            mtm: MainThreadMarker,
        ) -> Retained<UINib>;

        #[cfg(feature = "UINibLoading")]
        /// # Safety
        ///
        /// - `owner_or_nil` should be of the correct type.
        /// - `options_or_nil` generic should be of the correct type.
        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
        #[unsafe(method(instantiateWithOwner:options:))]
        #[unsafe(method_family = none)]
        pub unsafe fn instantiateWithOwner_options(
            &self,
            owner_or_nil: Option<&AnyObject>,
            options_or_nil: Option<&NSDictionary<UINibOptionsKey, AnyObject>>,
        ) -> Retained<NSArray>;
    );
}

/// Methods declared on superclass `NSObject`.
impl UINib {
    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(mtm: MainThreadMarker) -> Retained<Self>;
    );
}
