import { Observable } from '@nativescript/core';
import { GPUBuffer } from './GPUBuffer';
import { GPUTexture } from './GPUTexture';
import { native_ } from './Constants';
import { GPUShaderModule } from './GPUShaderModule';
import { GPUQueue } from './GPUQueue';
import { GPUPipelineLayout } from './GPUPipelineLayout';
import { GPURenderPipeline } from './GPURenderPipeline';
import { GPUCommandEncoder } from './GPUCommandEncoder';
import { GPUDeviceLostInfo } from './Errors';
import { GPUBindGroup } from './GPUBindGroup';
import { GPUBindGroupLayout } from './GPUBindGroupLayout';
import { GPUTextureView } from './GPUTextureView';
import { GPUSampler } from './GPUSampler';
import { GPUExternalTexture } from './GPUExternalTexture';
import type { GPUAddressMode, GPUCompareFunction, GPUErrorFilter, GPUFilterMode, GPUMipmapFilterMode, GPUQueryType, GPUTextureFormat, GPUTextureSampleType, GPUTextureViewDimension } from './Types';
import type { GPUDepthStencilState, GPUExternalTextureBindingLayout, GPUFragmentState, GPUMultisampleState, GPUPrimitiveState, GPUProgrammableStage, GPUVertexState } from './Interfaces';
import { GPUComputePipeline } from './GPUComputePipeline';
import { GPUQuerySet } from './GPUQuerySet';
import { GPURenderBundleEncoder } from './GPURenderBundleEncoder';
import { GPUAdapter, GPUSupportedFeatures } from './GPUAdapter';
export declare class EventTarget {
    protected _emitter?: WeakRef<Observable>;
    addEventListener(event: string, handler: any, options?: AddEventListenerOptions): void;
    removeEventListener(event: string, handler?: any): void;
    dispatchEvent(event: any): void;
}
interface GPUExtent3DDict {
    width: number;
    height?: number;
    depthOrArrayLayers?: number;
}
type GPUExtent3D = [number, number, number] | [number, number] | GPUExtent3DDict;
export declare class GPUDevice extends EventTarget {
    [native_]: any;
    private _lost;
    private _observerable;
    constructor();
    private _uncapturederror;
    static fromNative(device: any, adapter: GPUAdapter): GPUDevice;
    get label(): any;
    get lost(): Promise<GPUDeviceLostInfo>;
    get native(): any;
    get limits(): any;
    get features(): GPUSupportedFeatures;
    destroy(): void;
    createBindGroup(descriptor: {
        label?: string;
        layout: GPUBindGroupLayout;
        entries: {
            binding: number;
            resource: GPUTextureView | GPUSampler | GPUExternalTexture | {
                buffer: GPUBuffer;
                offset?: number;
                size?: number;
            };
        }[];
    }): GPUBindGroup;
    createBindGroupLayout(descriptor: {
        label?: string;
        entries: {
            binding: number;
            visibility: number;
            buffer?: {
                hasDynamicOffset?: boolean;
                minBindingSize?: number;
                type?: 'uniform' | 'storage' | 'read-only-storage';
            };
            externalTexture?: GPUExternalTextureBindingLayout;
            sampler?: {
                type?: 'filtering' | 'non-filtering' | 'comparison';
            };
            storageTexture?: {
                access?: 'write-only' | 'read-only' | 'read-write';
                format: GPUTextureFormat;
                viewDimension?: GPUTextureViewDimension;
            };
            texture?: {
                multisampled?: boolean;
                sampleType?: GPUTextureSampleType;
                viewDimension?: GPUTextureViewDimension;
            };
        }[];
    }): GPUBindGroupLayout;
    createBuffer(descriptor: {
        label?: string;
        mappedAtCreation?: boolean;
        size: number;
        usage: number;
    }): GPUBuffer;
    createCommandEncoder(descriptor?: {
        label?: string;
    }): GPUCommandEncoder;
    createComputePipeline(descriptor: {
        compute: GPUProgrammableStage;
        label?: string;
        layout: GPUPipelineLayout | 'auto';
    }): GPUComputePipeline;
    createComputePipelineAsync(descriptor: {
        compute: GPUProgrammableStage;
        label?: string;
        layout: GPUPipelineLayout | 'auto';
    }): Promise<unknown>;
    createPipelineLayout(descriptor: {
        bindGroupLayouts: GPUBindGroupLayout[];
        label?: string;
    }): GPUPipelineLayout;
    createQuerySet(descriptor: {
        count: number;
        label?: string;
        type: GPUQueryType;
    }): GPUQuerySet;
    createRenderBundleEncoder(descriptor: {
        colorFormats: (null | GPUTextureFormat)[];
        depthReadOnly?: boolean;
        depthStencilFormat?: GPUTextureFormat;
        label?: string;
        sampleCount?: number;
        stencilReadOnly?: boolean;
    }): GPURenderBundleEncoder;
    createRenderPipeline(descriptor: {
        depthStencil?: GPUDepthStencilState;
        fragment?: GPUFragmentState;
        label?: string;
        layout: GPUPipelineLayout | 'auto';
        multisample?: GPUMultisampleState;
        primitive?: GPUPrimitiveState;
        vertex: GPUVertexState;
    }): GPURenderPipeline;
    createRenderPipelineAsync(descriptor: {
        depthStencil?: GPUDepthStencilState;
        fragment?: GPUFragmentState;
        label?: string;
        layout: GPUPipelineLayout | 'auto';
        multisample?: GPUMultisampleState;
        primitive?: GPUPrimitiveState;
        vertex: GPUVertexState;
    }): Promise<unknown>;
    createSampler(descriptor?: {
        addressModeU?: GPUAddressMode;
        addressModeV?: GPUAddressMode;
        addressModeW?: GPUAddressMode;
        compare?: GPUCompareFunction;
        label?: string;
        lodMaxClamp?: number;
        lodMinClamp?: number;
        magFilter?: GPUFilterMode;
        maxAnisotropy?: number;
        minFilter?: GPUFilterMode;
        mipmapFilter?: GPUMipmapFilterMode;
    }): GPUSampler;
    createShaderModule(desc: {
        label?: string;
        code: string;
        sourceMap?: object;
        compilationHints?: any[];
    }): GPUShaderModule;
    createTexture(descriptor: {
        label?: string;
        size: GPUExtent3D;
        mipLevelCount?: number;
        sampleCount?: number;
        dimension?: '1d' | '2d' | '3d';
        format: GPUTextureFormat;
        usage: number;
        viewFormats?: any[];
    }): GPUTexture;
    popErrorScope(): Promise<unknown>;
    pushErrorScope(filter: GPUErrorFilter): void;
    private _queue;
    get queue(): GPUQueue;
}
export {};
