"use strict";var e=require("@babel/runtime/helpers/defineProperty"),r=require("prop-types"),t=require("../constants.js"),n=require("./TraceSelect.js"),a=require("react/jsx-runtime");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=i(e),o=i(r);function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function s(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?c(Object(t),!0).forEach((function(r){u.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var p=function(e){var r,i,u=e.trackSettings,o=e.onChange,c=e.mapping;return a.jsx(n,{value:null===(r=u.traces)||void 0===r||null===(i=r[0])||void 0===i?void 0:i.key,onChange:function(e){var r=c.find((function(r){return r.key===e}));o("traces",[s(s({},t.DEFAULT_TRACE_SETTINGS),{},{key:e,id:e},r)])},mapping:c,showLabel:!0})};p.propTypes={trackSettings:o.default.shape({traces:o.default.arrayOf(o.default.shape({key:o.default.string}))}).isRequired,onChange:o.default.func.isRequired,mapping:o.default.arrayOf(o.default.shape({})).isRequired},module.exports=p;
