# Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.


module Selenium
  module WebDriver
    class ActionBuilder
      @bridge: Remote::Bridge

      @duration: Integer

      @async: bool

      @devices: Array[Interactions::InputDevice]

      include KeyActions

      include PointerActions

      include WheelActions

      attr_reader devices: Array[Interactions::InputDevice]

      def initialize: (Remote::Bridge bridge, ?devices: Array[Interactions::InputDevice], ?async: bool, ?duration: ::Integer) -> void

      def add_pointer_input: (Symbol kind, String name) -> Interactions::InputDevice

      def add_key_input: (String name) -> Interactions::InputDevice

      def add_wheel_input: (String name) -> Interactions::InputDevice

      def device: (?name: String?, ?type: String?) -> Interactions::InputDevice?

      def pointer_inputs: () -> Array[Interactions::InputDevice]

      def key_inputs: () -> Array[Interactions::InputDevice]

      def wheel_inputs: () -> Array[Interactions::InputDevice]

      def pause: (?device: Interactions::InputDevice?, ?duration: Float) -> self

      def pauses: (?device: Interactions::InputDevice?, ?number: Integer?, ?duration: Float) -> self

      def perform: () -> nil

      def clear_all_actions: () -> Array[Selenium::WebDriver::Interactions::InputDevice]

      def release_actions: () -> untyped

      private

      def tick: (*Interactions::InputDevice action_devices) -> Array[Interactions::InputDevice]?

      def add_input: (Interactions::InputDevice | Symbol | interned device) -> Interactions::InputDevice
    end
  end
end
