import React from 'react';
import { codeGenerators } from '@looker/sdk-codegen';
import { Select } from '@looker/components';
import { useSelector } from 'react-redux';
import { useSettingActions, selectSdkLanguage } from '../../state';
export var SdkLanguageSelector = () => {
  var {
    setSdkLanguageAction
  } = useSettingActions();
  var selectedSdkLanguage = useSelector(selectSdkLanguage);
  var allSdkLanguages = codeGenerators.map(gen => ({
    value: gen.language
  }));
  allSdkLanguages.push({
    options: [{
      value: 'All'
    }]
  });

  var handleChange = language => {
    setSdkLanguageAction({
      sdkLanguage: language
    });
  };

  return React.createElement(Select, {
    "aria-label": "sdk language selector",
    value: selectedSdkLanguage,
    onChange: handleChange,
    options: allSdkLanguages
  });
};
//# sourceMappingURL=SdkLanguageSelector.js.map