include ../avatar/generated_avatar

script(type='text/ng-template', id='modals/hatchPet.html')
  - var tweet = env.t('hatchPetShare');
  .modal-content(style='min-width:28em')
    .modal-body.text-center(style='padding-bottom:0')
      h3(style='margin-bottom: 0')=env.t('hatchedPet',{egg:'{{::hatchedPet.egg}}', potion:'{{::hatchedPet.potion}}'})
      .container-fluid
        .row(style='margin-bottom:1em', ng-controller='UserCtrl')
          .col-xs-4(style='padding:0')
            div(class='{{::hatchedPet.pet}}').pull-right
          .col-xs-3
            .empty_bottles(style='margin-top:2.8em')
          .col-xs-5(style='padding:0')
            .herobox(style='padding:0; width:0; height:0')
              .character-sprites(style='width:0; margin-top:.5em')
                +generatedAvatar
      p=env.t('earnedCompanion')
      br
      button.btn.btn-primary(ng-click='choosePet(hatchedPet.eggKey, hatchedPet.potionKey); $close()')=env.t('displayNow')
      button.btn.btn-default(ng-click='$close()')=env.t('displayLater')
      .checkbox
        label(style='display:inline-block')=env.t('dontShowAgain')
          input(type='checkbox', ng-model='user.preferences.suppressModals.hatchPet', ng-change='set({"preferences.suppressModals.hatchPet": user.preferences.suppressModals.hatchPet?true: false})')
    .modal-footer(style='margin-top:0', ng-init='loadWidgets()')
      .container-fluid
        .row
          .col-xs-3
            a.twitter-share-button(href='https://twitter.com/intent/tweet?text=#{tweet}&via=habitica&url=#{env.BASE_URL}/social/hatch-pet&count=none')=env.t('tweet')
          .col-xs-4(style='margin-left:.8em')
            .fb-share-button(data-href='#{env.BASE_URL}/social/hatch-pet', data-layout='button')
          .col-xs-4(style='margin-left:.8em')
            a.tumblr-share-button(data-href='#{env.BASE_URL}/social/hatch-pet', data-notes='none')
