//! 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/appkit/nsfilepromisereceiver?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSFilePromiseReceiver;
);

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

#[cfg(feature = "NSPasteboard")]
extern_conformance!(
    unsafe impl NSPasteboardReading for NSFilePromiseReceiver {}
);

impl NSFilePromiseReceiver {
    extern_methods!(
        #[unsafe(method(readableDraggedTypes))]
        #[unsafe(method_family = none)]
        pub fn readableDraggedTypes() -> Retained<NSArray<NSString>>;

        #[unsafe(method(fileTypes))]
        #[unsafe(method_family = none)]
        pub fn fileTypes(&self) -> Retained<NSArray<NSString>>;

        #[unsafe(method(fileNames))]
        #[unsafe(method_family = none)]
        pub fn fileNames(&self) -> Retained<NSArray<NSString>>;

        #[cfg(feature = "block2")]
        /// # Safety
        ///
        /// - `options` generic should be of the correct type.
        /// - `operation_queue` possibly has additional threading requirements.
        #[unsafe(method(receivePromisedFilesAtDestination:options:operationQueue:reader:))]
        #[unsafe(method_family = none)]
        pub unsafe fn receivePromisedFilesAtDestination_options_operationQueue_reader(
            &self,
            destination_dir: &NSURL,
            options: &NSDictionary,
            operation_queue: &NSOperationQueue,
            reader: &block2::DynBlock<dyn Fn(NonNull<NSURL>, *mut NSError)>,
        );
    );
}

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

impl DefaultRetained for NSFilePromiseReceiver {
    #[inline]
    fn default_retained() -> Retained<Self> {
        Self::new()
    }
}
