//! 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::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uicontentunavailablealignment?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIContentUnavailableAlignment(pub NSInteger);
impl UIContentUnavailableAlignment {
    #[doc(alias = "UIContentUnavailableAlignmentCenter")]
    pub const Center: Self = Self(0);
    #[doc(alias = "UIContentUnavailableAlignmentNatural")]
    pub const Natural: Self = Self(1);
}

unsafe impl Encode for UIContentUnavailableAlignment {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for UIContentUnavailableAlignment {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uicontentunavailableconfiguration?language=objc)
    #[unsafe(super(NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UIContentUnavailableConfiguration;
);

extern_conformance!(
    unsafe impl NSCoding for UIContentUnavailableConfiguration {}
);

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

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

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

extern_conformance!(
    unsafe impl NSSecureCoding for UIContentUnavailableConfiguration {}
);

#[cfg(feature = "UIContentConfiguration")]
extern_conformance!(
    unsafe impl UIContentConfiguration for UIContentUnavailableConfiguration {}
);

impl UIContentUnavailableConfiguration {
    extern_methods!(
        /// Returns the default configuration for unavailable content.
        #[unsafe(method(emptyConfiguration))]
        #[unsafe(method_family = none)]
        pub fn emptyConfiguration(mtm: MainThreadMarker) -> Retained<Self>;

        /// Returns the default configuration for content which is loading.
        #[unsafe(method(loadingConfiguration))]
        #[unsafe(method_family = none)]
        pub fn loadingConfiguration(mtm: MainThreadMarker) -> Retained<Self>;

        /// Returns the default configuration for searches which return no results.
        #[unsafe(method(searchConfiguration))]
        #[unsafe(method_family = none)]
        pub fn searchConfiguration(mtm: MainThreadMarker) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;

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

        #[cfg(feature = "UIImage")]
        /// The image to display.
        #[unsafe(method(image))]
        #[unsafe(method_family = none)]
        pub fn image(&self) -> Option<Retained<UIImage>>;

        #[cfg(feature = "UIImage")]
        /// Setter for [`image`][Self::image].
        #[unsafe(method(setImage:))]
        #[unsafe(method_family = none)]
        pub fn setImage(&self, image: Option<&UIImage>);

        #[cfg(feature = "UIContentUnavailableImageProperties")]
        /// Additional properties to configure the image. When adopting the loading configuration, relevant properties are applied to the activity indicator.
        #[unsafe(method(imageProperties))]
        #[unsafe(method_family = none)]
        pub fn imageProperties(&self) -> Retained<UIContentUnavailableImageProperties>;

        /// The primary text.
        #[unsafe(method(text))]
        #[unsafe(method_family = none)]
        pub fn text(&self) -> Option<Retained<NSString>>;

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

        /// An attributed variant of the primary text, which supersedes the `text` and some properties of the `textProperties` if set.
        #[unsafe(method(attributedText))]
        #[unsafe(method_family = none)]
        pub fn attributedText(&self) -> Option<Retained<NSAttributedString>>;

        /// Setter for [`attributedText`][Self::attributedText].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setAttributedText:))]
        #[unsafe(method_family = none)]
        pub fn setAttributedText(&self, attributed_text: Option<&NSAttributedString>);

        #[cfg(feature = "UIContentUnavailableTextProperties")]
        /// Additional properties to configure the primary text.
        #[unsafe(method(textProperties))]
        #[unsafe(method_family = none)]
        pub fn textProperties(&self) -> Retained<UIContentUnavailableTextProperties>;

        /// The secondary text.
        #[unsafe(method(secondaryText))]
        #[unsafe(method_family = none)]
        pub fn secondaryText(&self) -> Option<Retained<NSString>>;

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

        /// An attributed variant of the secondary text, which supersedes the `secondaryText` and some properties of the `secondaryTextProperties` if set.
        #[unsafe(method(secondaryAttributedText))]
        #[unsafe(method_family = none)]
        pub fn secondaryAttributedText(&self) -> Option<Retained<NSAttributedString>>;

        /// Setter for [`secondaryAttributedText`][Self::secondaryAttributedText].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setSecondaryAttributedText:))]
        #[unsafe(method_family = none)]
        pub fn setSecondaryAttributedText(
            &self,
            secondary_attributed_text: Option<&NSAttributedString>,
        );

        #[cfg(feature = "UIContentUnavailableTextProperties")]
        /// Additional properties to configure the secondary text.
        #[unsafe(method(secondaryTextProperties))]
        #[unsafe(method_family = none)]
        pub fn secondaryTextProperties(&self) -> Retained<UIContentUnavailableTextProperties>;

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

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

        #[cfg(feature = "UIContentUnavailableButtonProperties")]
        /// Additional properties to configure the primary button.
        #[unsafe(method(buttonProperties))]
        #[unsafe(method_family = none)]
        pub fn buttonProperties(&self) -> Retained<UIContentUnavailableButtonProperties>;

        #[cfg(feature = "UIButtonConfiguration")]
        /// The secondary button.
        #[unsafe(method(secondaryButton))]
        #[unsafe(method_family = none)]
        pub fn secondaryButton(&self) -> Retained<UIButtonConfiguration>;

        #[cfg(feature = "UIButtonConfiguration")]
        /// Setter for [`secondaryButton`][Self::secondaryButton].
        #[unsafe(method(setSecondaryButton:))]
        #[unsafe(method_family = none)]
        pub fn setSecondaryButton(&self, secondary_button: &UIButtonConfiguration);

        #[cfg(feature = "UIContentUnavailableButtonProperties")]
        /// Additional properties to configure the secondary button.
        #[unsafe(method(secondaryButtonProperties))]
        #[unsafe(method_family = none)]
        pub fn secondaryButtonProperties(&self) -> Retained<UIContentUnavailableButtonProperties>;

        /// The alignment of the image, text and buttons.
        #[unsafe(method(alignment))]
        #[unsafe(method_family = none)]
        pub fn alignment(&self) -> UIContentUnavailableAlignment;

        /// Setter for [`alignment`][Self::alignment].
        #[unsafe(method(setAlignment:))]
        #[unsafe(method_family = none)]
        pub fn setAlignment(&self, alignment: UIContentUnavailableAlignment);

        #[cfg(feature = "UIGeometry")]
        /// Whether the content view will preserve inherited layout margins from its superview on the horizontal and/or vertical axes.
        #[unsafe(method(axesPreservingSuperviewLayoutMargins))]
        #[unsafe(method_family = none)]
        pub fn axesPreservingSuperviewLayoutMargins(&self) -> UIAxis;

        #[cfg(feature = "UIGeometry")]
        /// Setter for [`axesPreservingSuperviewLayoutMargins`][Self::axesPreservingSuperviewLayoutMargins].
        #[unsafe(method(setAxesPreservingSuperviewLayoutMargins:))]
        #[unsafe(method_family = none)]
        pub fn setAxesPreservingSuperviewLayoutMargins(
            &self,
            axes_preserving_superview_layout_margins: UIAxis,
        );

        #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
        /// The margins for the content to the edges of the content view. (When preserving superview layout margins on one or both axes, these are just minimum margins, as inherited margins may be larger.)
        #[unsafe(method(directionalLayoutMargins))]
        #[unsafe(method_family = none)]
        pub fn directionalLayoutMargins(&self) -> NSDirectionalEdgeInsets;

        #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
        /// Setter for [`directionalLayoutMargins`][Self::directionalLayoutMargins].
        #[unsafe(method(setDirectionalLayoutMargins:))]
        #[unsafe(method_family = none)]
        pub fn setDirectionalLayoutMargins(
            &self,
            directional_layout_margins: NSDirectionalEdgeInsets,
        );

        #[cfg(feature = "objc2-core-foundation")]
        /// Padding between the image and text. Only applies when there is both an image and text.
        #[unsafe(method(imageToTextPadding))]
        #[unsafe(method_family = none)]
        pub fn imageToTextPadding(&self) -> CGFloat;

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`imageToTextPadding`][Self::imageToTextPadding].
        #[unsafe(method(setImageToTextPadding:))]
        #[unsafe(method_family = none)]
        pub fn setImageToTextPadding(&self, image_to_text_padding: CGFloat);

        #[cfg(feature = "objc2-core-foundation")]
        /// Padding between the text and secondary text. Only applies when there is both text and secondary text.
        #[unsafe(method(textToSecondaryTextPadding))]
        #[unsafe(method_family = none)]
        pub fn textToSecondaryTextPadding(&self) -> CGFloat;

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`textToSecondaryTextPadding`][Self::textToSecondaryTextPadding].
        #[unsafe(method(setTextToSecondaryTextPadding:))]
        #[unsafe(method_family = none)]
        pub fn setTextToSecondaryTextPadding(&self, text_to_secondary_text_padding: CGFloat);

        #[cfg(feature = "objc2-core-foundation")]
        /// Padding between the button and text. Only applies when there is both a button and text.
        #[unsafe(method(textToButtonPadding))]
        #[unsafe(method_family = none)]
        pub fn textToButtonPadding(&self) -> CGFloat;

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`textToButtonPadding`][Self::textToButtonPadding].
        #[unsafe(method(setTextToButtonPadding:))]
        #[unsafe(method_family = none)]
        pub fn setTextToButtonPadding(&self, text_to_button_padding: CGFloat);

        #[cfg(feature = "objc2-core-foundation")]
        /// Padding between the button and secondary button. Only applies when there is both a button and a secondary button.
        #[unsafe(method(buttonToSecondaryButtonPadding))]
        #[unsafe(method_family = none)]
        pub fn buttonToSecondaryButtonPadding(&self) -> CGFloat;

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`buttonToSecondaryButtonPadding`][Self::buttonToSecondaryButtonPadding].
        #[unsafe(method(setButtonToSecondaryButtonPadding:))]
        #[unsafe(method_family = none)]
        pub fn setButtonToSecondaryButtonPadding(
            &self,
            button_to_secondary_button_padding: CGFloat,
        );

        #[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);
    );
}
