The template name type that determines the label structure.
Optionaltemplate: TThe template name to use for generating the label.
Optionaldata: Partial<TemplatesData[T]>Partial template data to customize the energy label.
An EnergyLabel instance ready to generate the SVG.
const label = createEnergyLabel('smartphones', {
flagOrigin: 'EU',
supplierOrTrademark: 'Sultana',
modelIdentifier: '92COU8944VK',
eprelRegistrationNumber: '3712289',
energyClass: 'D',
batteryEndurancePerCycle: 4020,
repeatedFreeFallReliabilityClass: 'C',
repairabilityClass: 'E',
batteryEnduranceInCycles: '3900',
ingressProtectionRating: 'IP14'
})
// Generate with specific template
const svgString = label.toString()
Creates an
EnergyLabelinstance for generating energy label SVGs.