<script setup lang="ts">
import { useStore } from '@/store'
import { watch } from 'vue';
import { storeToRefs } from 'pinia';
const store = useStore();
const { selectedNode} = storeToRefs(store)

watch(selectedNode, async (newNode, _oldNode) => {
  if(!newNode)
    return;
})

function okPressed() {
  // store.config.addDynamic(dynNode.value);
}
defineExpose({ okPressed })
</script>

<template>
  <div class="card">
    <div class="card-body" v-if="selectedNode != null">
      <h5 class="card-title">Dynamic Node</h5>
      <div class="card-text">
        <div class="input-group mb-3">
          <div class="input-group-prepend">
            <span class="input-group-text" id="inputGroup-sizing-default">Count query</span>
          </div>
          <input type="text" class="form-control" aria-label="Default"
            aria-describedby="inputGroup-sizing-default" v-model="selectedNode.nodeId" disabled> 
        </div>
      </div>
    </div>
  </div>
</template>

<style scoped>
  ul.no-bullets {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
</style>@/store