import React, { FunctionComponent, HTMLAttributes, ReactNode, Fragment } from 'react';
import { getClassName } from '../../helpers/getClassName';
import { classNames } from '../../lib/classNames';
import { usePlatform } from '../../hooks/usePlatform';
import { HasPlatform, HasRootRef } from '../../types';
import { hasReactNode, isPrimitiveReactNode } from '../../lib/utils';
import { Platform, PlatformType } from '../../lib/platform';
import Headline from '../Typography/Headline/Headline';
import Caption from '../Typography/Caption/Caption';
import Title from '../Typography/Title/Title';
import Text from '../Typography/Text/Text';
import Subhead from '../Typography/Subhead/Subhead';
export interface HeaderProps extends HTMLAttributes, HasRootRef {
mode?: 'primary' | 'secondary' | 'tertiary';
subtitle?: ReactNode;
/**
* Допускаются иконки, текст, Link
*/
aside?: ReactNode;
/**
* Допускаются текст, Indicator
*/
indicator?: ReactNode;
multiline?: boolean;
}
function renderChildren({ children, platform, mode }: Pick & HasPlatform) {
switch (platform) {
case Platform.ANDROID:
switch (mode) {
case 'primary':
return {children};
case 'secondary':
return
{children}
;
case 'tertiary':
return {children};
}
break;
case Platform.IOS:
switch (mode) {
case 'primary':
case 'tertiary':
return {children};
case 'secondary':
return
{children}
;
}
break;
case Platform.VKCOM:
switch (mode) {
case 'primary':
return {children};
case 'secondary':
case 'tertiary':
return