<toastr>
    <script>
        var self = this;
        obs.on("toastrView", function(obj) {

            var param = obj;

            toastr.options = {
                "closeButton": param.closeButton,
                "debug": false,
                "newestOnTop": false,
                "progressBar": true,
                "positionClass": param.type != 'error' ? param.position : 'toast-top-center',
                "preventDuplicates": false,
                "onclick": null,
                "showDuration": "300",
                "hideDuration": "1000",
                "timeOut": param.type != 'error' ? param.timeOut : 0,
                "extendedTimeOut": "1000",
                "showEasing": "swing",
                "hideEasing": "linear",
                "showMethod": "fadeIn",
                "hideMethod": "fadeOut"
            };

            switch(param.type) {
                case "success":
                    toastr.success(param.text).width("50%");
                    break;
                case "info":
                    toastr.info(param.text).width("50%");
                    break;
                case "warning":
                    toastr.warning(param.text).width("50%");
                    break;
                case "error":
                    toastr.error(param.text).width("50%");
                    break;
                default:
                    break;
            }
        })
    </script>
</toastr>