import { css } from 'reshadow' ; import { composes } from '@cloudbeaver/core-theming' ; export const InlineEditorStyles = composes ( css `
  editor {
    composes: theme-border-color-background from global;
  }

  editor-actions {
    composes: theme-background-surface theme-text-on-surface theme-border-color-background from global;
  }

  editor-action {
    composes: theme-ripple from global;
  }

  input {
    composes: theme-text-text-primary-on-light from global;
  }
  ` , css `
  editor {
    position: relative;
    box-sizing: border-box;
    display: flex;
    width: 100%;
    height: 100%;
    border: solid 1px;
  }

  editor:focus-within, editor[|active] {
    border-color: #52c41a !important;
  }

  editor-container {
    position: relative;
    height: 100%;
    flex: 1;
    display: flex;

    & input, & input[disabled], & input[readonly] {
      border: none;
      border-radius: unset;
      width: 100%;
      height: 100%;
      min-height: unset;
      padding: 0 8px;
    }
  }
  
  editor-actions {
    position: absolute;
    top: -1px;
    left: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    border: solid 1px;
  }

  editor:focus-within, editor[|active] {
    & editor-actions {
      border-top-color:  #52c41a !important;
      border-right-color: #52c41a !important;
      border-bottom-color: #52c41a !important;
    }
  }

  editor-actions[|position=inside] {
    position: relative;
    flex: 0 0 auto;
    bottom: auto;
    left: auto;
    border-right: none !important;
  }

  editor-actions[|position=bottom],
  editor-actions[|position=top] {
    right: -1px;
    left: auto;
  }

  editor:focus-within, editor[|active] {
    & editor-actions[|position=bottom],
    & editor-actions[|position=top] {
      border-left-color: #52c41a !important;
    }
  }

  editor-actions[|position=bottom] {
    top: 100%;
  }

  editor-actions[|position=top] {
    bottom: 100%;
    top: auto;
  }

  editor-action {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    width: 24px;
    padding: 4px;
    cursor: pointer;
    background: transparent;

    & Loader {
      width: 100%;
      height: 100%;
    }

    & IconOrImage {
      display: block;
      width: 100%;
    }

    & Icon {
      width: 100%;
    }

    &[disabled]::before {
      display: none;
    }
  }
` ) ;