export const RECIPE_SEARCH_SHELL_BASE_SHADOW = '0 5px 10px rgba(0,0,0,0.16), 0 14px 22px rgba(0,0,0,0.24), 0 22px 34px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.04), inset 0 2px 6px rgba(0,0,0,0.16), inset 0 -1px 2px rgba(255,255,255,0.02)'; function escapeHtml(s) { return String(s) .replace(/&/g, '&') .replace(//g, '>') .replace(/"/g, '"'); } export function getRecipeSearchFieldHTML({ shellId, inputId, placeholder = 'Szukaj przepisów...', inputAriaLabel = '', inputValue = '', filterButtonId = '', filterButtonAction = '', filterButtonLabel = 'Otwórz filtry', } = {}) { const hasFilterButton = Boolean(filterButtonId); const actionAttr = hasFilterButton && filterButtonAction ? ` onclick="${escapeHtml(filterButtonAction)}"` : ''; const inputPadding = hasFilterButton ? 'pl-8 pr-14' : 'pl-8 pr-8'; const ariaLabel = inputAriaLabel || placeholder; return `
${hasFilterButton ? ` ` : ''}
`; } export function syncRecipeSearchShellShadow(searchShell) { if (!searchShell) return; searchShell.style.boxShadow = RECIPE_SEARCH_SHELL_BASE_SHADOW; }