//! 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/uidocumentviewcontrollerlaunchoptions?language=objc)
    #[unsafe(super(NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UIDocumentViewControllerLaunchOptions;
);

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

impl UIDocumentViewControllerLaunchOptions {
    extern_methods!(
        #[cfg(all(
            feature = "UIDocumentBrowserViewController",
            feature = "UIResponder",
            feature = "UIViewController"
        ))]
        /// The view controller for browsing documents to open.
        #[unsafe(method(browserViewController))]
        #[unsafe(method_family = none)]
        pub fn browserViewController(&self) -> Retained<UIDocumentBrowserViewController>;

        #[cfg(all(
            feature = "UIDocumentBrowserViewController",
            feature = "UIResponder",
            feature = "UIViewController"
        ))]
        /// Setter for [`browserViewController`][Self::browserViewController].
        #[unsafe(method(setBrowserViewController:))]
        #[unsafe(method_family = none)]
        pub fn setBrowserViewController(
            &self,
            browser_view_controller: &UIDocumentBrowserViewController,
        );

        /// The title of the view. Default is the application's name.
        #[unsafe(method(title))]
        #[unsafe(method_family = none)]
        pub fn title(&self) -> Retained<NSString>;

        /// Setter for [`title`][Self::title].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setTitle:))]
        #[unsafe(method_family = none)]
        pub fn setTitle(&self, title: &NSString);

        #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
        /// The primary action.
        #[unsafe(method(primaryAction))]
        #[unsafe(method_family = none)]
        pub fn primaryAction(&self) -> Option<Retained<UIAction>>;

        #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
        /// Setter for [`primaryAction`][Self::primaryAction].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setPrimaryAction:))]
        #[unsafe(method_family = none)]
        pub fn setPrimaryAction(&self, primary_action: Option<&UIAction>);

        #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
        /// The secondary action.
        #[unsafe(method(secondaryAction))]
        #[unsafe(method_family = none)]
        pub fn secondaryAction(&self) -> Option<Retained<UIAction>>;

        #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
        /// Setter for [`secondaryAction`][Self::secondaryAction].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setSecondaryAction:))]
        #[unsafe(method_family = none)]
        pub fn setSecondaryAction(&self, secondary_action: Option<&UIAction>);

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        /// The view which displays an open document. Default is the view controller's view.
        #[unsafe(method(documentTargetView))]
        #[unsafe(method_family = none)]
        pub fn documentTargetView(&self) -> Option<Retained<UIView>>;

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        /// Setter for [`documentTargetView`][Self::documentTargetView].
        #[unsafe(method(setDocumentTargetView:))]
        #[unsafe(method_family = none)]
        pub fn setDocumentTargetView(&self, document_target_view: Option<&UIView>);

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        /// The foreground accessory view.
        #[unsafe(method(foregroundAccessoryView))]
        #[unsafe(method_family = none)]
        pub fn foregroundAccessoryView(&self) -> Option<Retained<UIView>>;

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        /// Setter for [`foregroundAccessoryView`][Self::foregroundAccessoryView].
        #[unsafe(method(setForegroundAccessoryView:))]
        #[unsafe(method_family = none)]
        pub fn setForegroundAccessoryView(&self, foreground_accessory_view: Option<&UIView>);

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        /// The background accessory view.
        #[unsafe(method(backgroundAccessoryView))]
        #[unsafe(method_family = none)]
        pub fn backgroundAccessoryView(&self) -> Option<Retained<UIView>>;

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        /// Setter for [`backgroundAccessoryView`][Self::backgroundAccessoryView].
        #[unsafe(method(setBackgroundAccessoryView:))]
        #[unsafe(method_family = none)]
        pub fn setBackgroundAccessoryView(&self, background_accessory_view: Option<&UIView>);

        #[cfg(feature = "UIBackgroundConfiguration")]
        /// The background configuration.
        #[unsafe(method(background))]
        #[unsafe(method_family = none)]
        pub fn background(&self) -> Retained<UIBackgroundConfiguration>;

        #[cfg(feature = "UIBackgroundConfiguration")]
        /// Setter for [`background`][Self::background].
        #[unsafe(method(setBackground:))]
        #[unsafe(method_family = none)]
        pub fn setBackground(&self, background: &UIBackgroundConfiguration);

        #[cfg(all(
            feature = "UIAction",
            feature = "UIDocument",
            feature = "UIMenuElement"
        ))]
        /// Returns an action which requests the creation of a new document with the specified intent.
        /// Can be used for either the primary or secondary action.
        #[unsafe(method(createDocumentActionWithIntent:))]
        #[unsafe(method_family = none)]
        pub fn createDocumentActionWithIntent(
            intent: &UIDocumentCreationIntent,
            mtm: MainThreadMarker,
        ) -> Retained<UIAction>;
    );
}

/// Methods declared on superclass `NSObject`.
impl UIDocumentViewControllerLaunchOptions {
    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>;
    );
}
