import React from 'react';
import { AutoComplete } from '@digigov/ui/form/AutoComplete';
import { suggest } from '@digigov/ui/form/AutoComplete/utils';
import { Button } from '@digigov/ui/form/Button';
import { FieldContainer } from '@digigov/ui/form/FieldContainer';

export const WithCustomValue = () => (
  <div>
    <FieldContainer>
      <AutoComplete
        source={suggest}
        id="govgr"
        templates={{
          suggestion: (value) => {
            return '--> ' + value;
          },
          inputValue: (value) => {
            return value ? 'Χώρα: ' + value : '';
          },
        }}
        tNoResults={() => 'Δεν υπάρχουν αποτελέσματα'}
      />
    </FieldContainer>
    <Button>Υποβολή</Button>
  </div>
);

export default WithCustomValue;
