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

#[cfg(feature = "UIVisualEffect")]
extern_conformance!(
    unsafe impl NSCoding for UIVibrancyEffect {}
);

#[cfg(feature = "UIVisualEffect")]
extern_conformance!(
    unsafe impl NSCopying for UIVibrancyEffect {}
);

#[cfg(feature = "UIVisualEffect")]
unsafe impl CopyingHelper for UIVibrancyEffect {
    type Result = Self;
}

#[cfg(feature = "UIVisualEffect")]
extern_conformance!(
    unsafe impl NSObjectProtocol for UIVibrancyEffect {}
);

#[cfg(feature = "UIVisualEffect")]
extern_conformance!(
    unsafe impl NSSecureCoding for UIVibrancyEffect {}
);

#[cfg(feature = "UIVisualEffect")]
impl UIVibrancyEffect {
    extern_methods!(
        #[cfg(feature = "UIBlurEffect")]
        #[unsafe(method(effectForBlurEffect:))]
        #[unsafe(method_family = none)]
        pub fn effectForBlurEffect(blur_effect: &UIBlurEffect) -> Retained<UIVibrancyEffect>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "UIVisualEffect")]
impl UIVibrancyEffect {
    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>;
    );
}

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uivibrancyeffectstyle?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIVibrancyEffectStyle(pub NSInteger);
impl UIVibrancyEffectStyle {
    #[doc(alias = "UIVibrancyEffectStyleLabel")]
    pub const Label: Self = Self(0);
    #[doc(alias = "UIVibrancyEffectStyleSecondaryLabel")]
    pub const SecondaryLabel: Self = Self(1);
    #[doc(alias = "UIVibrancyEffectStyleTertiaryLabel")]
    pub const TertiaryLabel: Self = Self(2);
    #[doc(alias = "UIVibrancyEffectStyleQuaternaryLabel")]
    pub const QuaternaryLabel: Self = Self(3);
    #[doc(alias = "UIVibrancyEffectStyleFill")]
    pub const Fill: Self = Self(4);
    #[doc(alias = "UIVibrancyEffectStyleSecondaryFill")]
    pub const SecondaryFill: Self = Self(5);
    #[doc(alias = "UIVibrancyEffectStyleTertiaryFill")]
    pub const TertiaryFill: Self = Self(6);
    #[doc(alias = "UIVibrancyEffectStyleSeparator")]
    pub const Separator: Self = Self(7);
}

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

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

/// AdditionalStyles.
#[cfg(feature = "UIVisualEffect")]
impl UIVibrancyEffect {
    extern_methods!(
        #[cfg(feature = "UIBlurEffect")]
        #[unsafe(method(effectForBlurEffect:style:))]
        #[unsafe(method_family = none)]
        pub fn effectForBlurEffect_style(
            blur_effect: &UIBlurEffect,
            style: UIVibrancyEffectStyle,
        ) -> Retained<UIVibrancyEffect>;
    );
}
