import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { Space } from 'antd';
import { MemberType } from './Members';
import { MemberTag } from './MemberTag';
import { GranularitySelect } from './Settings';
export function TimeDimension({ member, granularity = 'day', onGranularityChange, onRemove, }) {
    if (!member) {
        console.warn('Rollup Designer received `undefined` member as TimeDimension');
        return null;
    }
    return (_jsxs(_Fragment, { children: [_jsx(MemberType, { children: "Time dimension" }), _jsxs(Space, { children: [_jsx(MemberTag, { name: member.shortTitle, cubeName: member.title.replace(member.shortTitle, ''), onClose: () => onRemove(member.name) }), _jsx(GranularitySelect, { value: granularity, onChange: onGranularityChange })] })] }));
}
//# sourceMappingURL=TimeDimension.js.map