"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../node_modules/tslib/tslib.es6.js"),t=require("../node_modules/@rematch/core/dist/core.esm.js"),n=require("../static/incoming_ringtone.js"),i=require("../static/example_tone1.js"),s=require("../static/example_tone2.js"),a=require("../static/example_tone3.js"),o=require("../static/example_tone4.js"),u=require("../static/silent_ringtone.js"),r={availableRingtones:[{name:"default",displayName:"Default",base64Audio:n.default},{name:"classic",displayName:"Classic",base64Audio:i.default},{name:"modern",displayName:"Modern",base64Audio:s.default},{name:"soft",displayName:"Soft",base64Audio:a.default},{name:"gentle",displayName:"Gentle",base64Audio:o.default},{name:"silent",displayName:"Silent",base64Audio:u.default}],selectedRingtone:"default",outputDeviceId:null},l=t.createModel()({state:r,reducers:{setSelectedRingtone:function(t,n){return t.availableRingtones.some((function(e){return e.name===n}))?e.__assign(e.__assign({},t),{selectedRingtone:n}):(console.warn('Ringtone "'.concat(n,'" not found. Keeping current selection.')),t)},setOutputDeviceId:function(t,n){return e.__assign(e.__assign({},t),{outputDeviceId:n})},reset:function(){return r}},effects:function(e){return{getSelectedRingtoneAudio:function(e,t){var n=t.ringtones,i=n.selectedRingtone,s=n.availableRingtones,a=s.find((function(e){return e.name===i}));return(null==a?void 0:a.base64Audio)||s[0].base64Audio}}}});exports.ringtones=l;
//# sourceMappingURL=ringtones.js.map
