//! 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::*;

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

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

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

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

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

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

impl UIShadowProperties {
    extern_methods!(
        #[cfg(feature = "UIColor")]
        /// The color to use when rendering the shadow. Defaults to `UIColor.blackColor`.
        #[unsafe(method(color))]
        #[unsafe(method_family = none)]
        pub fn color(&self) -> Retained<UIColor>;

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

        #[cfg(feature = "objc2-core-foundation")]
        /// The shadow's opacity. Defaults to `0.0`.
        #[unsafe(method(opacity))]
        #[unsafe(method_family = none)]
        pub fn opacity(&self) -> CGFloat;

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

        #[cfg(feature = "objc2-core-foundation")]
        /// The blur radius, in points, used to render the shadow. Defaults to `0.0`.
        #[unsafe(method(radius))]
        #[unsafe(method_family = none)]
        pub fn radius(&self) -> CGFloat;

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

        #[cfg(feature = "objc2-core-foundation")]
        /// The offset, in points, of the layer's shadow. Defaults to `CGSizeZero`.
        #[unsafe(method(offset))]
        #[unsafe(method_family = none)]
        pub fn offset(&self) -> CGSize;

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

        #[cfg(feature = "UIBezierPath")]
        /// The path that is used to create the shadow. When `nil`, the shadow will be rendered to match
        /// the bounds of the view that it is applied to.
        /// Defaults to `nil`.
        #[unsafe(method(path))]
        #[unsafe(method_family = none)]
        pub fn path(&self) -> Option<Retained<UIBezierPath>>;

        #[cfg(feature = "UIBezierPath")]
        /// Setter for [`path`][Self::path].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setPath:))]
        #[unsafe(method_family = none)]
        pub fn setPath(&self, path: Option<&UIBezierPath>);
    );
}

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