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

/// Enumeration of text formatting actions.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerchangetype?language=objc)
// NS_TYPED_ENUM
pub type UITextFormattingViewControllerChangeType = NSString;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerundefinedchangetype?language=objc)
    pub static UITextFormattingViewControllerUndefinedChangeType:
        &'static UITextFormattingViewControllerChangeType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollersetboldchangetype?language=objc)
    pub static UITextFormattingViewControllerSetBoldChangeType:
        &'static UITextFormattingViewControllerChangeType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerremoveboldchangetype?language=objc)
    pub static UITextFormattingViewControllerRemoveBoldChangeType:
        &'static UITextFormattingViewControllerChangeType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollersetitalicchangetype?language=objc)
    pub static UITextFormattingViewControllerSetItalicChangeType:
        &'static UITextFormattingViewControllerChangeType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerremoveitalicchangetype?language=objc)
    pub static UITextFormattingViewControllerRemoveItalicChangeType:
        &'static UITextFormattingViewControllerChangeType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollersetunderlinechangetype?language=objc)
    pub static UITextFormattingViewControllerSetUnderlineChangeType:
        &'static UITextFormattingViewControllerChangeType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerremoveunderlinechangetype?language=objc)
    pub static UITextFormattingViewControllerRemoveUnderlineChangeType:
        &'static UITextFormattingViewControllerChangeType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollersetstrikethroughchangetype?language=objc)
    pub static UITextFormattingViewControllerSetStrikethroughChangeType:
        &'static UITextFormattingViewControllerChangeType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerremovestrikethroughchangetype?language=objc)
    pub static UITextFormattingViewControllerRemoveStrikethroughChangeType:
        &'static UITextFormattingViewControllerChangeType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerfontchangetype?language=objc)
    pub static UITextFormattingViewControllerFontChangeType:
        &'static UITextFormattingViewControllerChangeType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerfontsizechangetype?language=objc)
    pub static UITextFormattingViewControllerFontSizeChangeType:
        &'static UITextFormattingViewControllerChangeType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerincreasefontsizechangetype?language=objc)
    pub static UITextFormattingViewControllerIncreaseFontSizeChangeType:
        &'static UITextFormattingViewControllerChangeType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerdecreasefontsizechangetype?language=objc)
    pub static UITextFormattingViewControllerDecreaseFontSizeChangeType:
        &'static UITextFormattingViewControllerChangeType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollertextcolorchangetype?language=objc)
    pub static UITextFormattingViewControllerTextColorChangeType:
        &'static UITextFormattingViewControllerChangeType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerlineheightpointsizechangetype?language=objc)
    pub static UITextFormattingViewControllerLineHeightPointSizeChangeType:
        &'static UITextFormattingViewControllerChangeType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerincreaseindentationchangetype?language=objc)
    pub static UITextFormattingViewControllerIncreaseIndentationChangeType:
        &'static UITextFormattingViewControllerChangeType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerdecreaseindentationchangetype?language=objc)
    pub static UITextFormattingViewControllerDecreaseIndentationChangeType:
        &'static UITextFormattingViewControllerChangeType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerformattingstylechangetype?language=objc)
    pub static UITextFormattingViewControllerFormattingStyleChangeType:
        &'static UITextFormattingViewControllerChangeType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollertextlistchangetype?language=objc)
    pub static UITextFormattingViewControllerTextListChangeType:
        &'static UITextFormattingViewControllerChangeType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollertextalignmentchangetype?language=objc)
    pub static UITextFormattingViewControllerTextAlignmentChangeType:
        &'static UITextFormattingViewControllerChangeType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerhighlightchangetype?language=objc)
    pub static UITextFormattingViewControllerHighlightChangeType:
        &'static UITextFormattingViewControllerChangeType;
}

extern_class!(
    /// Describes text formatting change that is a result of user action.
    /// Contains type of change, any associated value that may be applicable to that change.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerchangevalue?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UITextFormattingViewControllerChangeValue;
);

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

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

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

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

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

impl UITextFormattingViewControllerChangeValue {
    extern_methods!(
        /// Type of change.
        #[unsafe(method(changeType))]
        #[unsafe(method_family = none)]
        pub fn changeType(&self) -> Retained<UITextFormattingViewControllerChangeType>;

        /// On formatting style change, use this property to determine selected style.
        #[unsafe(method(formattingStyleKey))]
        #[unsafe(method_family = none)]
        pub fn formattingStyleKey(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "UIFont")]
        /// Any font that may be associated with the change.
        /// For example, this property will be available in case of font typography settings change or new font selection.
        #[unsafe(method(font))]
        #[unsafe(method_family = none)]
        pub fn font(&self) -> Option<Retained<UIFont>>;

        #[cfg(feature = "UIColor")]
        /// Any color value that may be associated with the change.
        /// For example, this property will be available if user has changed text color.
        #[unsafe(method(color))]
        #[unsafe(method_family = none)]
        pub fn color(&self) -> Option<Retained<UIColor>>;

        /// Any number value that may be associated with the change.
        /// For example, if case of font point size change, this property will reflect new point size.
        #[unsafe(method(numberValue))]
        #[unsafe(method_family = none)]
        pub fn numberValue(&self) -> Option<Retained<NSNumber>>;

        #[cfg(feature = "UITextFormattingViewControllerFormattingDescriptor")]
        /// Text list style associated with the `UITextFormattingViewControllerTextListChangeType`.
        /// If property is nil for `UITextFormattingViewControllerTextListChangeType`, it indicates text list has been removed.
        #[unsafe(method(textList))]
        #[unsafe(method_family = none)]
        pub fn textList(&self) -> Option<Retained<UITextFormattingViewControllerTextList>>;

        #[cfg(feature = "NSText")]
        /// Text alignment associated with the `UITextFormattingViewControllerTextAlignmentChangeType`.
        #[unsafe(method(textAlignment))]
        #[unsafe(method_family = none)]
        pub fn textAlignment(&self) -> NSTextAlignment;

        #[cfg(feature = "UITextFormattingViewControllerFormattingDescriptor")]
        /// Text highlight associated with the `UITextFormattingViewControllerHighlightChangeType`.
        /// If property is nil for `UITextFormattingViewControllerHighlightChangeType`, it indicates highlight has been removed.
        #[unsafe(method(highlight))]
        #[unsafe(method_family = none)]
        pub fn highlight(&self) -> Option<Retained<UITextFormattingViewControllerHighlight>>;

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

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