//! 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/appkit/nssplitviewitemaccessoryviewcontroller?language=objc)
    #[unsafe(super(NSViewController, NSResponder, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
    pub struct NSSplitViewItemAccessoryViewController;
);

#[cfg(all(
    feature = "NSAnimation",
    feature = "NSResponder",
    feature = "NSViewController"
))]
extern_conformance!(
    unsafe impl NSAnimatablePropertyContainer for NSSplitViewItemAccessoryViewController {}
);

#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
extern_conformance!(
    unsafe impl NSCoding for NSSplitViewItemAccessoryViewController {}
);

#[cfg(all(
    feature = "NSKeyValueBinding",
    feature = "NSResponder",
    feature = "NSViewController"
))]
extern_conformance!(
    unsafe impl NSEditor for NSSplitViewItemAccessoryViewController {}
);

#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
extern_conformance!(
    unsafe impl NSObjectProtocol for NSSplitViewItemAccessoryViewController {}
);

#[cfg(all(
    feature = "NSResponder",
    feature = "NSStoryboardSegue",
    feature = "NSViewController"
))]
extern_conformance!(
    unsafe impl NSSeguePerforming for NSSplitViewItemAccessoryViewController {}
);

#[cfg(all(
    feature = "NSResponder",
    feature = "NSUserInterfaceItemIdentification",
    feature = "NSViewController"
))]
extern_conformance!(
    unsafe impl NSUserInterfaceItemIdentification for NSSplitViewItemAccessoryViewController {}
);

#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
impl NSSplitViewItemAccessoryViewController {
    extern_methods!(
        /// When set, this property will collapse the accessory view to 0 height (animatable) but not remove it from the window.
        /// Set through the animator object to animate it.
        #[unsafe(method(isHidden))]
        #[unsafe(method_family = none)]
        pub fn isHidden(&self) -> bool;

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

        /// Whether or not standard content insets should be applied to the view.
        /// Defaults to YES.
        #[unsafe(method(automaticallyAppliesContentInsets))]
        #[unsafe(method_family = none)]
        pub fn automaticallyAppliesContentInsets(&self) -> bool;

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

        #[unsafe(method(viewWillAppear))]
        #[unsafe(method_family = none)]
        pub fn viewWillAppear(&self);

        #[unsafe(method(viewDidAppear))]
        #[unsafe(method_family = none)]
        pub fn viewDidAppear(&self);

        #[unsafe(method(viewWillDisappear))]
        #[unsafe(method_family = none)]
        pub fn viewWillDisappear(&self);

        #[unsafe(method(viewDidDisappear))]
        #[unsafe(method_family = none)]
        pub fn viewDidDisappear(&self);
    );
}

/// Methods declared on superclass `NSViewController`.
#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
impl NSSplitViewItemAccessoryViewController {
    extern_methods!(
        #[cfg(feature = "NSNib")]
        #[unsafe(method(initWithNibName:bundle:))]
        #[unsafe(method_family = init)]
        pub fn initWithNibName_bundle(
            this: Allocated<Self>,
            nib_name_or_nil: Option<&NSNibName>,
            nib_bundle_or_nil: Option<&NSBundle>,
        ) -> Retained<Self>;

        /// # Safety
        ///
        /// `coder` possibly has further requirements.
        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;
    );
}

/// Methods declared on superclass `NSResponder`.
#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
impl NSSplitViewItemAccessoryViewController {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
impl NSSplitViewItemAccessoryViewController {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}
