<script lang="ts">
	import { untrack } from 'svelte'
	import ScriptBuilder from '$lib/components/ScriptBuilder.svelte'
	import AiChatLayout from './copilot/chat/AiChatLayout.svelte'
	import type { ScriptBuilderProps } from './script_builder'

	let { script: oldScript, disableAi, ...props }: ScriptBuilderProps = $props()

	let script = $state(untrack(() => oldScript))
</script>

<AiChatLayout noPadding {disableAi}>
	<ScriptBuilder bind:script {disableAi} {...props} />
</AiChatLayout>
