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

use crate::*;

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITextAutocapitalizationType(pub NSInteger);
impl UITextAutocapitalizationType {
    #[doc(alias = "UITextAutocapitalizationTypeNone")]
    pub const None: Self = Self(0);
    #[doc(alias = "UITextAutocapitalizationTypeWords")]
    pub const Words: Self = Self(1);
    #[doc(alias = "UITextAutocapitalizationTypeSentences")]
    pub const Sentences: Self = Self(2);
    #[doc(alias = "UITextAutocapitalizationTypeAllCharacters")]
    pub const AllCharacters: Self = Self(3);
}

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

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

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITextAutocorrectionType(pub NSInteger);
impl UITextAutocorrectionType {
    #[doc(alias = "UITextAutocorrectionTypeDefault")]
    pub const Default: Self = Self(0);
    #[doc(alias = "UITextAutocorrectionTypeNo")]
    pub const No: Self = Self(1);
    #[doc(alias = "UITextAutocorrectionTypeYes")]
    pub const Yes: Self = Self(2);
}

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

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

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITextSpellCheckingType(pub NSInteger);
impl UITextSpellCheckingType {
    #[doc(alias = "UITextSpellCheckingTypeDefault")]
    pub const Default: Self = Self(0);
    #[doc(alias = "UITextSpellCheckingTypeNo")]
    pub const No: Self = Self(1);
    #[doc(alias = "UITextSpellCheckingTypeYes")]
    pub const Yes: Self = Self(2);
}

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

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

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITextSmartQuotesType(pub NSInteger);
impl UITextSmartQuotesType {
    #[doc(alias = "UITextSmartQuotesTypeDefault")]
    pub const Default: Self = Self(0);
    #[doc(alias = "UITextSmartQuotesTypeNo")]
    pub const No: Self = Self(1);
    #[doc(alias = "UITextSmartQuotesTypeYes")]
    pub const Yes: Self = Self(2);
}

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

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

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITextSmartDashesType(pub NSInteger);
impl UITextSmartDashesType {
    #[doc(alias = "UITextSmartDashesTypeDefault")]
    pub const Default: Self = Self(0);
    #[doc(alias = "UITextSmartDashesTypeNo")]
    pub const No: Self = Self(1);
    #[doc(alias = "UITextSmartDashesTypeYes")]
    pub const Yes: Self = Self(2);
}

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

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

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITextSmartInsertDeleteType(pub NSInteger);
impl UITextSmartInsertDeleteType {
    #[doc(alias = "UITextSmartInsertDeleteTypeDefault")]
    pub const Default: Self = Self(0);
    #[doc(alias = "UITextSmartInsertDeleteTypeNo")]
    pub const No: Self = Self(1);
    #[doc(alias = "UITextSmartInsertDeleteTypeYes")]
    pub const Yes: Self = Self(2);
}

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

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

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITextInlinePredictionType(pub NSInteger);
impl UITextInlinePredictionType {
    #[doc(alias = "UITextInlinePredictionTypeDefault")]
    pub const Default: Self = Self(0);
    #[doc(alias = "UITextInlinePredictionTypeNo")]
    pub const No: Self = Self(1);
    #[doc(alias = "UITextInlinePredictionTypeYes")]
    pub const Yes: Self = Self(2);
}

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

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

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIKeyboardType(pub NSInteger);
impl UIKeyboardType {
    #[doc(alias = "UIKeyboardTypeDefault")]
    pub const Default: Self = Self(0);
    #[doc(alias = "UIKeyboardTypeASCIICapable")]
    pub const ASCIICapable: Self = Self(1);
    #[doc(alias = "UIKeyboardTypeNumbersAndPunctuation")]
    pub const NumbersAndPunctuation: Self = Self(2);
    #[doc(alias = "UIKeyboardTypeURL")]
    pub const URL: Self = Self(3);
    #[doc(alias = "UIKeyboardTypeNumberPad")]
    pub const NumberPad: Self = Self(4);
    #[doc(alias = "UIKeyboardTypePhonePad")]
    pub const PhonePad: Self = Self(5);
    #[doc(alias = "UIKeyboardTypeNamePhonePad")]
    pub const NamePhonePad: Self = Self(6);
    #[doc(alias = "UIKeyboardTypeEmailAddress")]
    pub const EmailAddress: Self = Self(7);
    #[doc(alias = "UIKeyboardTypeDecimalPad")]
    pub const DecimalPad: Self = Self(8);
    #[doc(alias = "UIKeyboardTypeTwitter")]
    pub const Twitter: Self = Self(9);
    #[doc(alias = "UIKeyboardTypeWebSearch")]
    pub const WebSearch: Self = Self(10);
    #[doc(alias = "UIKeyboardTypeASCIICapableNumberPad")]
    pub const ASCIICapableNumberPad: Self = Self(11);
    #[doc(alias = "UIKeyboardTypeAlphabet")]
    pub const Alphabet: Self = Self(UIKeyboardType::ASCIICapable.0);
}

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

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

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIKeyboardAppearance(pub NSInteger);
impl UIKeyboardAppearance {
    #[doc(alias = "UIKeyboardAppearanceDefault")]
    pub const Default: Self = Self(0);
    #[doc(alias = "UIKeyboardAppearanceDark")]
    pub const Dark: Self = Self(1);
    #[doc(alias = "UIKeyboardAppearanceLight")]
    pub const Light: Self = Self(2);
    #[doc(alias = "UIKeyboardAppearanceAlert")]
    pub const Alert: Self = Self(UIKeyboardAppearance::Dark.0);
}

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

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

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIReturnKeyType(pub NSInteger);
impl UIReturnKeyType {
    pub const UIReturnKeyDefault: Self = Self(0);
    pub const UIReturnKeyGo: Self = Self(1);
    pub const UIReturnKeyGoogle: Self = Self(2);
    pub const UIReturnKeyJoin: Self = Self(3);
    pub const UIReturnKeyNext: Self = Self(4);
    pub const UIReturnKeyRoute: Self = Self(5);
    pub const UIReturnKeySearch: Self = Self(6);
    pub const UIReturnKeySend: Self = Self(7);
    pub const UIReturnKeyYahoo: Self = Self(8);
    pub const UIReturnKeyDone: Self = Self(9);
    pub const UIReturnKeyEmergencyCall: Self = Self(10);
    pub const UIReturnKeyContinue: Self = Self(11);
}

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

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

// NS_TYPED_ENUM
pub type UITextContentType = NSString;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UITextInputPasswordRules;

    unsafe impl ClassType for UITextInputPasswordRules {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSCoding for UITextInputPasswordRules {}

unsafe impl NSCopying for UITextInputPasswordRules {}

unsafe impl NSObjectProtocol for UITextInputPasswordRules {}

unsafe impl NSSecureCoding for UITextInputPasswordRules {}

extern_methods!(
    unsafe impl UITextInputPasswordRules {
        #[method_id(@__retain_semantics Other passwordRulesDescriptor)]
        pub unsafe fn passwordRulesDescriptor(&self) -> Retained<NSString>;

        #[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>;

        #[method_id(@__retain_semantics Other passwordRulesWithDescriptor:)]
        pub unsafe fn passwordRulesWithDescriptor(
            password_rules_descriptor: &NSString,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;
    }
);

extern_protocol!(
    pub unsafe trait UITextInputTraits: NSObjectProtocol + IsMainThreadOnly {
        #[optional]
        #[method(autocapitalizationType)]
        unsafe fn autocapitalizationType(&self) -> UITextAutocapitalizationType;

        #[optional]
        #[method(setAutocapitalizationType:)]
        unsafe fn setAutocapitalizationType(
            &self,
            autocapitalization_type: UITextAutocapitalizationType,
        );

        #[optional]
        #[method(autocorrectionType)]
        unsafe fn autocorrectionType(&self) -> UITextAutocorrectionType;

        #[optional]
        #[method(setAutocorrectionType:)]
        unsafe fn setAutocorrectionType(&self, autocorrection_type: UITextAutocorrectionType);

        #[optional]
        #[method(spellCheckingType)]
        unsafe fn spellCheckingType(&self) -> UITextSpellCheckingType;

        #[optional]
        #[method(setSpellCheckingType:)]
        unsafe fn setSpellCheckingType(&self, spell_checking_type: UITextSpellCheckingType);

        #[optional]
        #[method(smartQuotesType)]
        unsafe fn smartQuotesType(&self) -> UITextSmartQuotesType;

        #[optional]
        #[method(setSmartQuotesType:)]
        unsafe fn setSmartQuotesType(&self, smart_quotes_type: UITextSmartQuotesType);

        #[optional]
        #[method(smartDashesType)]
        unsafe fn smartDashesType(&self) -> UITextSmartDashesType;

        #[optional]
        #[method(setSmartDashesType:)]
        unsafe fn setSmartDashesType(&self, smart_dashes_type: UITextSmartDashesType);

        #[optional]
        #[method(smartInsertDeleteType)]
        unsafe fn smartInsertDeleteType(&self) -> UITextSmartInsertDeleteType;

        #[optional]
        #[method(setSmartInsertDeleteType:)]
        unsafe fn setSmartInsertDeleteType(
            &self,
            smart_insert_delete_type: UITextSmartInsertDeleteType,
        );

        #[optional]
        #[method(inlinePredictionType)]
        unsafe fn inlinePredictionType(&self) -> UITextInlinePredictionType;

        #[optional]
        #[method(setInlinePredictionType:)]
        unsafe fn setInlinePredictionType(
            &self,
            inline_prediction_type: UITextInlinePredictionType,
        );

        #[optional]
        #[method(keyboardType)]
        unsafe fn keyboardType(&self) -> UIKeyboardType;

        #[optional]
        #[method(setKeyboardType:)]
        unsafe fn setKeyboardType(&self, keyboard_type: UIKeyboardType);

        #[optional]
        #[method(keyboardAppearance)]
        unsafe fn keyboardAppearance(&self) -> UIKeyboardAppearance;

        #[optional]
        #[method(setKeyboardAppearance:)]
        unsafe fn setKeyboardAppearance(&self, keyboard_appearance: UIKeyboardAppearance);

        #[optional]
        #[method(returnKeyType)]
        unsafe fn returnKeyType(&self) -> UIReturnKeyType;

        #[optional]
        #[method(setReturnKeyType:)]
        unsafe fn setReturnKeyType(&self, return_key_type: UIReturnKeyType);

        #[optional]
        #[method(enablesReturnKeyAutomatically)]
        unsafe fn enablesReturnKeyAutomatically(&self) -> bool;

        #[optional]
        #[method(setEnablesReturnKeyAutomatically:)]
        unsafe fn setEnablesReturnKeyAutomatically(&self, enables_return_key_automatically: bool);

        #[optional]
        #[method(isSecureTextEntry)]
        unsafe fn isSecureTextEntry(&self) -> bool;

        #[optional]
        #[method(setSecureTextEntry:)]
        unsafe fn setSecureTextEntry(&self, secure_text_entry: bool);

        #[optional]
        #[method_id(@__retain_semantics Other textContentType)]
        unsafe fn textContentType(&self) -> Retained<UITextContentType>;

        #[optional]
        #[method(setTextContentType:)]
        unsafe fn setTextContentType(&self, text_content_type: Option<&UITextContentType>);

        #[optional]
        #[method_id(@__retain_semantics Other passwordRules)]
        unsafe fn passwordRules(&self) -> Option<Retained<UITextInputPasswordRules>>;

        #[optional]
        #[method(setPasswordRules:)]
        unsafe fn setPasswordRules(&self, password_rules: Option<&UITextInputPasswordRules>);
    }

    unsafe impl ProtocolType for dyn UITextInputTraits {}
);

extern "C" {
    pub static UITextContentTypeName: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeNamePrefix: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeGivenName: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeMiddleName: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeFamilyName: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeNameSuffix: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeNickname: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeJobTitle: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeOrganizationName: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeLocation: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeFullStreetAddress: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeStreetAddressLine1: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeStreetAddressLine2: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeAddressCity: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeAddressState: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeAddressCityAndState: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeSublocality: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeCountryName: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypePostalCode: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeTelephoneNumber: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeEmailAddress: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeURL: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeCreditCardNumber: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeUsername: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypePassword: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeNewPassword: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeOneTimeCode: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeShipmentTrackingNumber: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeFlightNumber: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeDateTime: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeBirthdate: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeBirthdateDay: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeBirthdateMonth: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeBirthdateYear: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeCreditCardSecurityCode: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeCreditCardName: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeCreditCardGivenName: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeCreditCardMiddleName: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeCreditCardFamilyName: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeCreditCardExpiration: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeCreditCardExpirationMonth: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeCreditCardExpirationYear: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeCreditCardType: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeCellularEID: &'static UITextContentType;
}

extern "C" {
    pub static UITextContentTypeCellularIMEI: &'static UITextContentType;
}
