<template>
  <Modal
    v-if="isFormVisible"
    class="edit-form-modal-view"
    @backdropClicked="closeModal"
  >
    <div class="edit-form-modal-panel panel">
      <div class="panel-heading">
        {{ $t('post_status.edit_status') }}
      </div>
      <PostStatusForm
        class="panel-body"
        v-bind="params"
        @posted="closeModal"
        :disablePolls="true"
        :disableVisibilitySelector="true"
        :post-handler="doEditStatus"
      />
    </div>
  </Modal>
</template>

<script src="./edit_status_modal.js"></script>

<style lang="scss">
.modal-view.edit-form-modal-view {
  align-items: flex-start;
}
.edit-form-modal-panel {
  flex-shrink: 0;
  margin-block-start: 25%;
  margin-block-end: 2em;
  inline-size: 100%;
  max-inline-size: 700px;

  @media (orientation: landscape) {
    margin-block-start: 8%;
  }

  .form-bottom-left {
    max-inline-size: 6.5em;

    .emoji-icon {
      justify-content: end;
    }
  }
}
</style>
