# coding: jsx

import asyncio
from typing import Awaitable, Callable

from pyjsx import jsx, JSX


def AsyncPlaceholder(children: list[JSX], coro: Awaitable[JSX]) -> JSX:
	task = asyncio.create_task(coro)

	if not task.done():
		return children
	
	return task.result()