import React, { Component } from 'react';

import { injectIntl } from 'react-intl';
import { Async } from 'react-select';

import backendRequest from 'lib/backend';


const fn = async () => {
    let response = await backendRequest("/api/params/timezones", "GET");
    return { options: response.body };
}

const filtering = (filter, options) => {
    return options;
}

export default (props) => (
    <Async 
        { ...props }
        loadOptions={ fn }
        labelKey="name"
        valueKey="id"
        simpleValue
        />

);