package telegram

import (
	"strings"

	"github.com/tech/sendico/pkg/model"
)

func newDemoRequestTemplate(request *model.DemoRequest) messageTemplate {
	fields := []messageField{
		{label: "Name", value: request.Name},
		{label: "Organization", value: request.OrganizationName},
		{label: "Phone", value: request.Phone},
		{label: "Work email", value: request.WorkEmail},
		{label: "Payout volume", value: request.PayoutVolume},
	}
	if strings.TrimSpace(request.Comment) != "" {
		fields = append(fields, messageField{label: "Comment", value: request.Comment})
	}
	return messageTemplate{
		title:     "New demo request received",
		fields:    fields,
		emphasize: []string{"demo request"},
	}
}
