;
}) =>
menu => {
if (menu.showSearch$.value) {
return;
}
const data: MenuInputData = {
placeholder: config.placeholder,
initialValue: config.initialValue,
class: config.class,
onComplete: config.onComplete,
onChange: config.onChange,
};
const style = styleMap({
display: 'flex',
alignItems: 'center',
...(IS_MOBILE
? {
borderRadius: '12px',
backgroundColor: cssVarV2('layer/background/primary'),
padding: '12px',
gap: '8px',
}
: {
marginBottom: '8px',
gap: '4px',
}),
...config.style,
});
return html`
${config.prefix} ${renderInput(data, menu)} ${config.postfix}
`;
},
} satisfies Record>;