import { ComponentType } from './componentType';
<%_ if (enableTranslation) { _%>
import { useI18n } from '@/hooks/web/useI18nOut';
<%_ } _%>

/**
 * @description: 生成placeholder
 */
export function createPlaceholderMessage(component: ComponentType) {
  <%_ if (enableTranslation) { _%>
  const { t } = useI18n();
  <%_ } _%>
  if (!component) return;
  if (component.includes('RangePicker')) {
    <%_ if (enableTranslation) { _%>
    return [t('common.chooseText'), t('common.chooseText')];
    <%_ } else { _%>
    return ['t$t('common.chooseText')$t$', 't$t('common.chooseText')$t$'];
    <%_ } _%>
  }
  if (component.includes('Input') || component.includes('Complete') || component.includes('Rate')) {
    return <% if (enableTranslation) { %>t('common.inputText')<% } else { %>'t$t('common.inputText')$t$'<% } %>;
  } else {
    return <% if (enableTranslation) { %>t('common.chooseText')<% } else { %>'t$t('common.chooseText')$t$'<% } %>;
  }
}
