import { escapeHtml as esc } from './html.mjs';
import { studioLink, studioForm, studioUrl } from './studio-links.mjs';
export const studioTaskStages = { backlog: 'Backlog', active: 'In progress', review: 'In review', done: 'Done' };
const owners = ['Maya Chen', 'Jon Bell', 'Eli Rivera'];
const priorities = ['Normal', 'High', 'Low'];
export function createStudioTasks() {
return [
['ST-101', 'Map the flagship customer journey', 'cinder', 'backlog', 'Jon Bell', 'Normal', 'Walk the shop floor with Sofia and capture the touchpoints between arrival and checkout.'],
['ST-102', 'Specify the acoustic panels', 'tandem', 'backlog', 'Eli Rivera', 'Low', 'Compare the two acoustic samples against the brief for the member lounge.'],
['ST-103', 'Price the first retail rollout', 'forma', 'active', 'Maya Chen', 'High', 'Prepare a cost breakdown for the first three stores, including delivery and installation.'],
['ST-104', 'Refine the identity lockups', 'arc', 'active', 'Jon Bell', 'Normal', 'Prepare the horizontal and stacked lockups for the next review with Theo.'],
['ST-105', 'Check the fixture clearances', 'stillwater', 'active', 'Eli Rivera', 'Normal', 'Check the showroom measurements against the latest joinery drawings.'],
['ST-106', 'Sign off the material samples', 'union', 'review', 'Eli Rivera', 'High', 'Review the hospitality sample board with purchasing before releasing the order.'],
['ST-107', 'Approve the storefront elevations', 'forma', 'review', 'Maya Chen', 'Normal', 'Collect the retail team’s final approval on the revised street-facing elevations.'],
['ST-108', 'Issue the showroom survey', 'stillwater', 'done', 'Maya Chen', 'Normal', 'Send the measured survey and annotated photos to the installation team.'],
['ST-109', 'Deliver the concept deck', 'arc', 'done', 'Jon Bell', 'Low', 'Share the agreed creative direction and workshop notes with the client.'],
].map(([id, title, companyId, status, owner, priority, description]) => ({ id, title, companyId, status, owner, priority, description }));
}
function getValue(values, key) {
return values instanceof URLSearchParams ? values.get(key) ?? '' : values[key] ?? '';
}
function options(entries, value) {
return entries.map(([id, label]) => ``).join('');
}
function avatar(owner) {
const initials = owner.split(' ').map(word => word.charAt(0)).join('');
return `${esc(initials)}`;
}
function stage(status) {
return ``;
}
function priorityLabel(priority) {
return `${esc(priority)}`;
}
function card(task, companyName, scope, subheading, params) {
return `
${esc(task.id)}${priorityLabel(task.priority)}
<${subheading} class="stb-card-title">${esc(task.title)}${subheading}>
`;
}
function list(tasks, names, scope, params) {
if (!tasks.length) return '