protected function register_enqueue_hooks( $dependency, $context = null ) {
		$priority = $this->get_priority( $dependency );

		foreach ( [ 'wp_enqueue_scripts', 'admin_enqueue_scripts' ] as $hook ) {
			add_action( $hook, [ $this, 'enqueue' ], $priority, 1 );
		}

		$this->maybe_localize( $dependency, $context );
		$this->maybe_add_inline_script( $dependency, $context );
	}