define('@cardstack/tools/components/cs-placeholder-composition-panel', ['exports', '@cardstack/tools/templates/components/cs-placeholder-composition-panel', 'ember-inject-optional', '@cardstack/tools/private-api'], function (exports, _csPlaceholderCompositionPanel, _emberInjectOptional, _privateApi) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = Ember.Component.extend({
    layout: _csPlaceholderCompositionPanel.default,
    cardstackRouting: _emberInjectOptional.default.service('cardstack-routing'),
    tools: Ember.inject.service('cardstack-tools'),
    actions: {
      create: function create() {
        var _get$routeForNew = this.get('cardstackRouting').routeForNew(this.get('model.type'), this.get('tools.branch')),
            name = _get$routeForNew.name,
            params = _get$routeForNew.params,
            queryParams = _get$routeForNew.queryParams;

        queryParams.routingId = this.get('model.slug');
        (0, _privateApi.transitionTo)(Ember.getOwner(this), name, params.map(function (p) {
          return p[1];
        }), queryParams);
        this.get('tools').setActivePanel('cs-composition-panel');
        this.get('tools').setEditing(true);
      }
    }
  });
});