{#if isOpen}
e.key === 'Escape' && onClose()} role="presentation">
e.stopPropagation()} onkeydown={(e) => e.stopPropagation()} role="dialog" tabindex="-1">

Cast to Device

{#if castState.isConnected && castState.device}
Connected to {castState.device.name}
{:else}
{#if connecting}

Connecting...

{:else if loading && devices().length === 0}

Searching for devices...

{:else if error}

{error}

{:else if devices().length === 0}

No {getProtocolLabel(activeProtocol)} devices found

Make sure devices are on the same network

{:else}
{#each devices() as device} {/each}
{/if}
{/if}
{/if}