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

unsafe impl Send for UIImageConfiguration {}

unsafe impl Sync for UIImageConfiguration {}

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

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

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

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

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

impl UIImageConfiguration {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;

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

        #[cfg(feature = "UITraitCollection")]
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(traitCollection))]
        #[unsafe(method_family = none)]
        pub unsafe fn traitCollection(&self) -> Option<Retained<UITraitCollection>>;

        #[cfg(feature = "UITraitCollection")]
        #[unsafe(method(configurationWithTraitCollection:))]
        #[unsafe(method_family = none)]
        pub fn configurationWithTraitCollection(
            &self,
            trait_collection: Option<&UITraitCollection>,
        ) -> Retained<Self>;

        #[cfg(feature = "UITraitCollection")]
        #[unsafe(method(configurationWithTraitCollection:))]
        #[unsafe(method_family = none)]
        pub fn configurationWithTraitCollection_class(
            trait_collection: Option<&UITraitCollection>,
        ) -> Retained<Self>;

        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(locale))]
        #[unsafe(method_family = none)]
        pub unsafe fn locale(&self) -> Option<Retained<NSLocale>>;

        #[unsafe(method(configurationWithLocale:))]
        #[unsafe(method_family = none)]
        pub fn configurationWithLocale(&self, locale: Option<&NSLocale>) -> Retained<Self>;

        #[unsafe(method(configurationWithLocale:))]
        #[unsafe(method_family = none)]
        pub fn configurationWithLocale_class(locale: Option<&NSLocale>) -> Retained<Self>;

        #[unsafe(method(configurationByApplyingConfiguration:))]
        #[unsafe(method_family = none)]
        pub fn configurationByApplyingConfiguration(
            &self,
            other_configuration: Option<&UIImageConfiguration>,
        ) -> Retained<Self>;
    );
}
