// @requirements REQ-EU-GUARANTEE-NOTICE REQ-PRODUCT-GUARANTEE-NOTICE import {producerGuaranteeFiles} from './product-build.mjs'; import {readFile} from 'node:fs/promises'; import {buildLegalGuaranteeNotice} from '@notabenda/core/guarantees/content'; import {renderLegalGuaranteeNotice} from '@notabenda/core/guarantees'; export async function guaranteeFiles(){ const built=await buildLegalGuaranteeNotice({language:'en',reviewStatus:'draft',allowPreview:true}),files={...built.files,'assets/guarantees.css':await readFile(new URL('../../packages/notabenda/dist/guarantees.css',import.meta.url),'utf8')}; for(const prefix of ['','/dark']){ const path=prefix.slice(1)+(prefix?'/':'')+'guarantees'; files[path+'/notice.json']=JSON.stringify(built.notice,null,2)+'\n'; files[path+'/index.html']=`Legal guarantee notice · Juniper Notes
Juniper NotesGuarantee notice

Notabenda · Consumer information

Know what
comes with it.

The official shop-level legal guarantee notice, with its wording available as readable text. The artwork keeps its own colours in either theme.

${renderLegalGuaranteeNotice(built.notice,{idPrefix:'shop-guarantee',allowPreview:true})}

A shop notice, a product label

This notice describes legal guarantee rights for goods. A qualifying producer durability guarantee uses a separate product-specific GARAN label.

View a product-specific label ↗

Integration and review guide ↗ · ${prefix?'Light':'Midnight'} theme ↗

Source integrity is checked. Legal and linguistic review, the source colour discrepancy and production placement remain open.

`; } return {...files,...await producerGuaranteeFiles()}; }