// form/nc/nc-define/nc-layout-editor/nc-element-property/nc-element-property.js
// preference/form/nc/nc-define/nc-layout-editor/property/nc-element-property.js

// eslint-disable-next-line no-unused-vars
import { cleanRecJson } from '/plugin/nc-layout-editor/nc-layout-editor-util.js'
import { propertyComponentName, loadPropertyComponent } from '/plugin/nc-layout-editor/nc-layout-editor-util.js'

console.debug('* nc-element-property lazy-loaded')

// eslint-disable-next-line no-unused-vars
const attributeValue = computed(() => {
	return rec.selected_node.attribute && rec.selected_node.attribute[':value']
})

const propertyComponent = computed(() => {
	if (rec.selected_node.component) {
		return propertyComponentName(rec.selected_node.component)
	}
	return ''
})

watch(
	propertyComponent,
	name => {
		if (false && name) {
			loadPropertyComponent(nc, rec, name)
		}
	},
	{ immediate: true }
)
