import { NodeConnectionTypes, type INodeDataBaseSchema, type INodeType } from '../../Interface'
import Setter from './setter.vue'
import { getNodeDescription, getNodeDisplayName } from '@/nodes/i18n'

export type SMSSenderData = INodeDataBaseSchema & {
	config_name: string // '配置名称'
	sign_name: string // '签名'
	template_code: string // '模版编号'
	senders: string // '发送者，多个名称用,分割'
}

export const smsSenderNode: INodeType = {
	version: ['1'],
	displayName: getNodeDisplayName('sms-sender'),
	name: 'sms-sender',
	Setter,
	description: getNodeDescription('sms-sender'),
	group: 'tool',
	icon: 'lucide:message-square-more',
	iconColor: '#00c375',
	inputs: [NodeConnectionTypes.main],
	outputs: [NodeConnectionTypes.main],
	// validate: (data: ModuleInvokeData) => {
	// 	return data?.interface_code?.trim()
	// 		? false
	// 		: i18n.t('pages.moduleInvokeSetter.interfaceCodeRequired')
	// },
	// getSubtitle: (data: ModuleInvokeData) => {
	// 	return data?.interface_code ? `code: ${data.interface_code}` : ''
	// },
	schema: {
		appAgentId: '',
		parentId: '',
		position: {
			x: 20,
			y: 30
		},
		width: 96,
		height: 96,
		selected: false,
		nodeType: 'sms-sender',
		zIndex: 1,
		data: {}
	}
}
