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

use crate::*;

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

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

impl UISwipeActionsConfiguration {
    extern_methods!(
        #[cfg(feature = "UIContextualAction")]
        #[unsafe(method(configurationWithActions:))]
        #[unsafe(method_family = none)]
        pub fn configurationWithActions(
            actions: &NSArray<UIContextualAction>,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[cfg(feature = "UIContextualAction")]
        #[unsafe(method(actions))]
        #[unsafe(method_family = none)]
        pub fn actions(&self) -> Retained<NSArray<UIContextualAction>>;

        #[unsafe(method(performsFirstActionWithFullSwipe))]
        #[unsafe(method_family = none)]
        pub fn performsFirstActionWithFullSwipe(&self) -> bool;

        /// Setter for [`performsFirstActionWithFullSwipe`][Self::performsFirstActionWithFullSwipe].
        #[unsafe(method(setPerformsFirstActionWithFullSwipe:))]
        #[unsafe(method_family = none)]
        pub fn setPerformsFirstActionWithFullSwipe(
            &self,
            performs_first_action_with_full_swipe: bool,
        );
    );
}

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