protected function maybe_add_inline_script( $dependency, $context ) {
		if ( ! array_key_exists( 'add_inline', $dependency ) ) {
			return;
		}

		$inline_script = $dependency['add_inline'];

		if ( is_callable( $inline_script ) ) {
			$inline_script = $inline_script( $context );
		}

		wp_add_inline_script( $dependency['handle'], $inline_script );
	}