//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "UIVisualEffect")]
    pub struct UIVibrancyEffect;

    #[cfg(feature = "UIVisualEffect")]
    unsafe impl ClassType for UIVibrancyEffect {
        #[inherits(NSObject)]
        type Super = UIVisualEffect;
        type Mutability = MainThreadOnly;
    }
);

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

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

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

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

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

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "UIVisualEffect")]
    unsafe impl UIVibrancyEffect {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    }
);

// 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);
}

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