<template>
  <el-form label-position="top">
    <BaseVM :image="image" :form-name="formName" />

    <WwwRoot :form-name="formName" />

    <el-form-item :label="I18nT('host.startCommand')">
      <el-input v-model="form.command"></el-input>
    </el-form-item>

    <PreviewVM :form-name="formName" />
  </el-form>
</template>

<script lang="ts" setup>
  import { computed } from 'vue'
  import { ComposeBuildForm } from '@/components/Podman/compose-build/Form'
  import { I18nT } from '@lang/index'
  import { OfficialImages } from '@/components/Podman/officialImages'
  import BaseVM from '@/components/Podman/compose-build/components/base.vue'
  import PreviewVM from '@/components/Podman/compose-build/components/preview.vue'
  import WwwRoot from '@/components/Podman/compose-build/components/wwwRoot.vue'

  const formName = 'Go (Golang)'
  const image = OfficialImages.golang?.image ?? ''

  const form = computed(() => {
    return ComposeBuildForm['Go (Golang)']
  })
</script>

<style scoped>
  pre {
    background: #f5f7fa;
    padding: 16px;
    border-radius: 4px;
    overflow: auto;
  }
</style>
