// components/ActionsComponent.js

import { escapeHtml }
    from '../utils/escapeHtml.js';

export class ActionsComponent {

    static render(section, data) {

        if (!section.actions) {

            return '';
        }

        const html = section.actions.map(action => {

            return `
                <button
                    class="card-action"
                    data-action="${escapeHtml(action)}"
                    data-id="${escapeHtml(data.id)}">

                    ${escapeHtml(action)}

                </button>
            `;

        }).join('');

        return `
            <div class="project-actions">
                ${html}
            </div>
        `;
    }
}
