import { ConfigStore } from './stores';

export default object => {
    if (!object) {
        return;
    }

    let { position } = object;

    if (!position || typeof position !== 'object') {
        return position;
    }

    return position[ConfigStore.get('app.locale')] || position.ru;
};
